« Return to Thread: Question about hardware channel allocation and sound buffers

Question about hardware channel allocation and sound buffers

by slytron :: Rate this Message:

Reply to Author | View in Thread

I am building a rpg. I currently have over 300 sounds but normally fewer than 10 will actually be playing at any given time.
I realize that most sound cards can only mix 32 or 64 sounds at a time.
The question is does a sound card hardware channel get allocated when a buffer is loaded with alBufferData and attached with AL_BUFFER or is the hardware channel only in use while the sound is playing? My plan is to buffer the sound when it is first played but not delete with alDeleteBuffers unless the creature is destroyed. My other option is to load the buffers when the sound is about to played and destroy it when the sound has finished but this seems ineffectient ( I am not currently worried about memory consumption.. only performance and avoiding loading from file each time ).
In other words in the extreme case there could be 100s of sounds loaded at the same time but only a few playing at any given time. Is it ok to leave the buffers loaded or do I need to reload them each time a sound is required to avoid using up all the hardware sound channels?
BTW Thanks for the previous help:)
Brett

 « Return to Thread: Question about hardware channel allocation and sound buffers