Hi to all,is there a very simple way to stop all the playing sound effects and sound effect instances? Maybe a method like Microsoft.Xna.Framework.Audio.StopAll().
Have you tried Alt-F4? XDI'm joking, of course, but I couldn't resist.
That would be handy. I'm not sure offhand. In my programs, I keep a list of all SoundInstances in progress, and then I can iterate and stop them individually.
Yes, I know you can manually stop all the instances stored in a list, but I was curious to know if there is a faster way. Anyway you can do that only on SoundEffectInstances and not SoundEffects. A method like StopAllSounds() would be very handy.
When I was working with this, I seem to recall not being able to find away. I ended up creating a manager that I would use to create sounds, which would then keep a reference to all sounds it created. Then I could call StopAll on the manager, which would iterate its list, stop its sounds, and let go of its reference.