nzo2
14-05-2007, 07:24 PM
This may have come up before, but how do you stop a certain sound from playing?
I don't mean calling the stop method, because this will clear ALL queued sounds of that type, I mean I want to stop instance (x) of sound (y) only.
I Added the ability to have play() return an id to the sprite that instigated the sound, so later if that sprite died, then I could find that instance and stop just that one.
However, the sounds are handled in a rotating buffer inside DXSound, so my ID is not preserved.
Without rewriting the whole sound buffer / queue thing, is there another way around this?
I don't mean calling the stop method, because this will clear ALL queued sounds of that type, I mean I want to stop instance (x) of sound (y) only.
I Added the ability to have play() return an id to the sprite that instigated the sound, so later if that sprite died, then I could find that instance and stop just that one.
However, the sounds are handled in a rotating buffer inside DXSound, so my ID is not preserved.
Without rewriting the whole sound buffer / queue thing, is there another way around this?