Managing Large Scale Sound Effects

Started by
-1 comments, last by JHL 18 years, 3 months ago
I'm working on a rts game and I'm attempting to make a robust sound effect management system using directsound8 but my problem is mostly api independent. I need to have close to a 100 different sound effects play on the fly although the number of different ones playing at the same time will problem never be greater then 10-12 (and background music) at the same time and that would problem be rare. My first attempt loaded all the sounds before hand in to IDirectSoundBuffer8 buffers and then created a duplicate buffer for each unit on the map for each sound it needed using DuplicateSoundBuffer() resulting in what will amount to like 1000 buffers . This seems very waste full I don't know how much of this is running in hardware and how much is in software but i suspect alot is in software. The other idea I had was to create the dublicate buffers on the fly and I think that this is the better idea but I'm not sure if this will be fast enough for this plus I'd still need to store one buffer for each individual wave file which still means 100+ buffers. I also though that it might be better to keep the wave in system memory and then create the buffer on the fly from that but this sounds quite slow to transfer it to sound card memory at that instant. But it also would mean that pretty much every sound would be playing in sound hardware and the lag potential is only at the start of the sound. I'm looking for any thoughts on the best management system or any one to explain how they've done it and just advice in general.

This topic is closed to new replies.

Advertisement