Link to .capx file (required!):
destroyInstanceSound.capx
Steps to reproduce:
You can drag&drop the red sprite to hear the effect of the 4 positionned sound
When you click on a blue sprite, it is destroyed and the sound they "emit" should stop.
Observed result:
Only if you destroy the instance with the highest IID will you stop all sounds.
Else the positionned sound are still playing their sound on position.
Expected result:
When I destroy a sprite, the associated positionned sound should be destroyed
I looked into the audio plugin.
The cause of this, is that when getAudioBuffer is called it will return the same AudioBuffer for the 4 sounds.
So in getAudioInstance, this AudioBuffer will see it's playTagWhenReady property overwritten by a new tag each time until the last enemy instance.
I couldn't quite find why the C2AudioInstances's tag does the same but they do (probably in request.onload in C2AudioBuffer's constructor).
Then, when the stop action is executed the 3 first tags won't be recognized.
So none of the positionned sound will stop.
Browsers affected:
Chrome: yes
Firefox: probably
Internet Explorer: probably
Operating system & service pack:
Windows server 2008 r2 SP1
Construct 2 version:
r124
Blood Type:
O+
Joke level:
-InfiniteYann2013-04-09 20:51:19