[openal] openSL backend

Philippe Simons simons.philippe at gmail.com
Tue Jan 21 14:04:06 EST 2014

On Tue, Jan 21, 2014 at 5:37 PM, Chris Robinson <chris.kcat at gmail.com>wrote:

> On 01/21/2014 05:31 AM, Philippe Simons wrote:
>> about: UpdateSize, in the current openSL implementation, you are already
>> changing it in the _reset_ function.
> Yes, just about any of the device format parameters can be changed as
> needed to fit the actual device constraints, and/or whatever actually gets
> set on the device. The only real restriction is that NumUpdates should be
> between 2 and 16, UpdateSize is between 64 and 8192, and Frequency is at
> least 8khz (maybe 11khz? I think the I3DL2 spec that EFX is based on has a
> minimum requirement of 11khz or 22khz) and should try to avoid being higher
> than 96khz (though it would likely work, it could maybe hit some range
> limits in some cases).
> I just mean that the UpdateSize should not be updated to reflect what the
> app specifies for the ALC_REFRESH setting, because the two or logically
> separate functions -- ALC_REFRESH determines how often the internal mixing
> parameters refresh, and UpdateSize is how many samples to mix on each
> update. Currently they're tied together because the internal parameters are
> updated with each mix update, but that probably won't always be the case
> (updating internal parameters is a bit costly, so it would benefit the
> mixer to not waste time doing that and instead just focus on mixing; it
> will also help in making the mixer lock-less).

Ok I see, so if I want to enable low-latency on Android, I can change the
UpdateSize and Frequency in _reset_.
I'll protect this with #ifdef ANDROID since it will involve JNI binding to
retrieve the "preferred" values.

>  May I change UpdateSize by just a bit
>> ie: UpdateSize is 1024, but I'd like to use 1200?
No it was just a sample, but currently I think that for a Nexus 4 the
UpdateSize should be 240 (or a multiple of).
I'll submit you a patch soon.

> A value like that would certainly work if the device can support it, but I
> think a power-of-two update size is more advantageous than an exact refresh
> value at 48 or 24khz. Is there a particular reason for that?
> _______________________________________________
> openal mailing list
> openal at openal.org
> http://openal.org/mailman/listinfo/openal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openal.org/pipermail/openal/attachments/20140121/7963a9d5/attachment.html>

More information about the openal mailing list