[openal] openSL backend

Chris Robinson chris.kcat at gmail.com
Tue Jan 21 11:37:38 EST 2014


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

> May I change UpdateSize by just a bit
> ie: UpdateSize is 1024, but I'd like to use 1200?

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?


More information about the openal mailing list