tigzi at July 26th, 2007 09:57 — #1
All is in the title, i m working with openAL, and i need to know what is the maximum number of sound which can be played in same time.
And i don't find anything in the documentation.
frank_skilton at July 26th, 2007 10:14 — #2
Wouldn't the value be hardware dependent?
thenut at July 26th, 2007 11:58 — #3
OpenAL on Windows uses Direct Sound, and since Direct Sound is hardware dependent, so too is OpenAL. ALSA (for Linux) is driver driven so it too is hardware dependent.
I read somewhere that if you wanted to know the maximum number of playable sounds, you need only continually create sources and when OpenAL fails to create one, you have your limit.
If all you're doing is simple games, you'll never need to worry about this. For more complex games, you'll need to reuse your sources on the fly.
skaldi at August 19th, 2007 12:05 — #4
OpenAL isn't using directsound if it isnt told to do by initialising the device.
To create sources until failure is the only way for me too, to determin the max sourcenumber.
But it is HIGHLY recommended to always reuse sources and not to gen sources in real time.
With an intelligent source management you can have 16 sources and you wont ever notice that there are only playing very finite sounds.
In the princip the source management works that way: If needed a source, run through your sources you created once and check if they are playing.
When not, reuse it.
Is there no source free you can have a priority system if the new sound shall be played. For example a source which is far away from the listener and very silent (a bird tweeting on a tree) can be overwritten by the new source which might be an explosion next to you.
After the explosion sound played the bird starts tweeting again due to the priority system (the source occupied by the explosion is now free again).
And to be honest you wont miss the birds tweeting during a battle.... So you wont ever notice this.
But modern hardware enables you to use up to 256 sources. But a sourcemanagement system is alway a big advance. Even when you have many sources to use.