How many DSSoundbuffers / Soundengine

Started by
2 comments, last by GameDev.net 24 years, 7 months ago
Hi,

I was playing with DirectSound a while back and was going to take exactly the same approach as you were. Prioritizing sounds and only creating as many DS buffers as indicated by the DS caps. However, I found that DS would let me allocate and even play more buffers than was indicted by the caps.
The specific cap I was looking at was something like "max hardware mixing buffers all". Also, the max amount of memory cap was a huge number, more than was available on the
sound card.

So I'm A little confused about how to interpret the DS caps. It may just be something weird with my particular sound card.

Pat


[This message has been edited by pdown (edited August 18, 1999).]

[This message has been edited by pdown (edited August 18, 1999).]

Advertisement
I don't think there is a pratical limit to the number of sound buffers that you have to worry about. The sound buffer is just a fancy area in memory holding the sound data etc. As long as you have enough memory you should be able to merrily create them till the proverbial cows come rolling home. (The only really bad return code I can find from CreateSoundBuffer is DSERR_OUTOFMEMORY.....)

You will get into trouble if you try to commit all sounds to the card itself but the main problem you will have is the cacophony if you try to play them all at once!

So.....Err.....Depends on the number of sounds you want. I would personally (and am trying) to go for a cache system - keep the ones you play regulsrly and cache in and out the rare ones.

Hello

One Question regarding Direct Sound :

What is the practical limitation (other than Ram)on the number of nonplaying DSSoundbuffer

Currently I think about writing kind of soundengine using DSound and i thought
creatinging some Soundbuffers for the frequently used Sounds ( player of player movement, some frequently used background noises )in the Onboard Ram of the Soundcard
an a lot of Buffers (~100, ~15k each ) for each possible,less frequently used sound,in SystemRam. I do not plan to play all Buffers
at once ! (By logging which buffers are actually playing and giving the buffers different prioritis depending on the importance of
the Soundeffect in the buffer for the game,
i only want to play the x most important
buffers at a given time ( where x depends on hardware caps and user preferences )

thank you for reading my question

imhiro
Am I going to face problems by maintainging
about 100 DSSoundBuffers in SystemRam ?

I Creating->Playing->Releasing a single Buffers for each used Soundeffect a better
way to go ?


quick note about this:

while you can have pretty much all of the sounds that you want, make sure that the static buffers only contain short sounds, no more than a few seconds.

also, if you want to have several copies of the same sound to be heard concurrently, dont create separate buffers. instead, make duplicate buffers using IDirectSound:: DuplicateSoundBuffer.

[This message has been edited by TANSTAAFL (edited September 01, 1999).]

Get off my lawn!

This topic is closed to new replies.

Advertisement