Re: OpenAL: how to determine maximum available Sources
Re: OpenAL: how to determine maximum available Sources
- Subject: Re: OpenAL: how to determine maximum available Sources
- From: Eric Wing <email@hidden>
- Date: Mon, 6 Dec 2010 23:04:47 -0800
On 12/6/10, Pi <email@hidden> wrote:
> The OpenAL code I'm using just #defines MAX_SOURCES 32
>
> I have found that I can set this number arbitrarily high e.g. 1024. And *
> alGenSources* does not complain. It happily generates 1024 sourceIds
> without returning an error. However only the first handful, say 32
> actually play a sound.
>
> Is there somewhere I can interrogate the system to figure out how many
> _working_ sources it can handle? it is very ugly to #define something
> which may well change between different devices.
>
Sorry, there isn't. Part of the reason for this was that Creative
Labs/Windows allowed for the ability to dynamically divert resources
to or from other processes also using the audio hardware so the number
is actually variable at runtime. So I think an API for this was
punted.
On iOS, the current limit is 32 as you found. Experimentally and
looking at Apple's Mac implementation (which is open source), you can
generate up to 256 sources, but only 32 can simultaneously play on
iOS. I have a nice table of all these limits in my book for all the
different OpenAL implementations.
-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden