[openal] OpenALSoft on Android, how to handle suspend/resume of application

Chris Robinson chris.kcat at gmail.com
Tue Sep 4 23:34:41 EDT 2018


On 09/03/2018 06:24 AM, Olle Hedman wrote:
> coreaudio-ios-buildfix.diff
> -
> This small patch is to make coreaudio backend build and run on iOS. Capture
> is disabled. (I have no use for it, and there was some issue with it, I
> don't remember exactly. Possibly it's not available on iOS, or there was
> some sandbox/entitlement issue)

Was the capture issue a problem with compiling, or a problem running the 
app even if it doesn't attempt to create a capture device?

> ios-bundle-config.diff
> -
> Another minor iOS fix, this makes it possible to keep the config file in
> the application bundle.
> This might not be needed, but it was how I solved it at that time. Possibly
> you could also just "chdir()" in your app to the bundle path and it would
> also work.
> I'm not using a config file now, but I thought I should include this patch
> anyhow.

This looks like it may be worth adding regardless.

> wave-output.diff

For this, there may be another option. By the looks of it, you want to 
write out the mix to a wav file as the corresponding video frames are 
processed, in non-real-time (then compress and mux the audio with the 
video afterward). What you can do instead is use OpenAL Soft's 
ALC_SOFT_loopback extension to mix the audio in non-real-time, and you 
then write it to a wav file however you can (or encode it directly).

<http://kcat.strangesoft.net/openal-extensions/SOFT_loopback.txt>

The alloopback example shows the extension in action, using SDL to play 
the resulting mix (though you can of course do whatever else you want 
instead with the rendered mix, as fast or as slow as you want).


More information about the openal mailing list