• Advertisement

Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

How many DSSoundbuffers / Soundengine

This topic is 6716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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).]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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 ?


Share this post


Link to post
Share on other sites
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).]

Share this post


Link to post
Share on other sites

  • Advertisement