audio API issue

Q&A about the latest versions
Post Reply
ffurger
Posts: 102
Joined: Mon Mar 24, 2014 11:45 am

I have a pano tour consisting of 4 panos. Each pano include a background sound,
BUT only 3 of them start playing immediately, the fourth sound must be started manually.
I have created a simple sound player. It consists of a toggle play and pause button.
I have set all background sound to loop = -1. That way, I thought I could control which sounds to start immediately
and which ones can be started/paused by the user.

The problem: If I move from pano 1 to 4, the audio player works as expected.
However, when moving back from pano 4 to pano 1 the pano player breaks down.
It looks as if there is an issue with loading/unloading/reloading the sound files.
The sound API documentation doesn't include a reset method or some such, so I can't tell what's going on. The player becomes unresponsive, or can no longer be paused.

Part of the problem is that I am not entirely sure what is the state of the audio player when setting loop = -1.

Any thought/suggestions would be much appreciated. I can include the actual code if it helps.

Thank you,
Franco
ffurger
Posts: 102
Joined: Mon Mar 24, 2014 11:45 am

Never mind - I think I solved the problem, even though I am not entirely sure what the problem actually was :D
I think it had something to do with JS closures...
Post Reply