playing lotsa sounds at the same time,
Members - Reputation: 122
Posted 26 January 2000 - 04:34 PM
Posted 26 January 2000 - 06:59 PM
and I don''t wanna wait for the last gun shot sound to finish.
So I use DuplicateSoundBuffer() to create duplicate pointers
to my gun shot sound data. And I play the duplicate sound.
That''s the easy part.
Question is, what do I do with all these pointers after the
sound is played? I know I have to delete/get rid of them, but
how do you do that safely? I obviously have to keep track of
them all, and I probably want to be able to create as many
pointers as needed, and I also have to be able to wait for it
to finish playing completely.
How do I manage and clean this mess up?
Posted 29 January 2000 - 08:53 AM
Members - Reputation: 440
Posted 29 January 2000 - 09:38 AM
// every frame play the sound
If you don''t stop the sound first, then nothing will happen and the sound will continue to play. Try:
// stop last frames sound
// play this frame sound