It is good to be aware that just like objects in ToolBook, audio files have a
name attribute which is set when
pgSoundLoader() is run. If an invisible audio is playing with
name =
"My Audio" and another one is started with the same
name attribute, then only the current audio will be tracked under the name
"My Audio". In this scenario, it is possible that when you move to the next page only the most recent audio file with the name
"My Audio" will actually be stopped and the previous one will continue playing unless it stops naturally by coming to the end of its timeline.
So the logic is this:
- If two audio files must play at the same time, then each one must be given a distinct name attribute. Then both will be stopped on page navigation.
- If multiple audio files are going to be played reusing the same name attribute, then the previous one must be unloaded BEFORE loading the next one begins playing. The exception is if in your Actions logic the next audio can only play if the previous one has finished by reaching the end of its timeline.
A nice advantage of
pgSoundLoader() is that is can handle mult-channel audio playback. But this ability can cause some confusion if you fail to manage what is going on when each audio is loaded and begins playing.
Just a little audio FYI.