Play the same sound several times at the same time

Charlie111

13-08-2010 19:58:56

Hi,

I would like to play the same sound several times at the same time. Is it possible?
It's for the shot of a machine gun.
For the moment, I play the sound for one shot and I have to wait for this sound to finish before I can play it again.
I cheat by doing:
if(m_SoundShot->isPlaying())
m_SoundShot->stop();
m_SoundShot->play();
but I'm not really happy with the result.
Do I have to create a bunch of sounds or is there a simpler option.

Thanks

++

Phobius

21-08-2010 22:40:42

Yes, you will have to create a bunch of sounds. If you think about it, this conceptually makes sense because each bullet from a gun would make its own sound, so multiple sound instances are only logical. If you're worried about buffer usage, then don't be. All of the sounds will use the same buffer.