Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


How many DSSoundbuffers / Soundengine


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Posted 01 September 1999 - 01:00 PM

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 ?




Sponsor:

#2 pdown   Members   -  Reputation: 122

Posted 18 August 1999 - 09:45 AM

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


#3 Psepha   Members   -  Reputation: 122

Posted 01 September 1999 - 08:35 AM

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.


#4 TANSTAAFL   Moderators   -  Reputation: 1152

Posted 01 September 1999 - 01:00 PM

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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS