We have an App that can listen in the background, but it only works if we start listening while the App is in the foreground, and then switch to the background, and we can see the red bar at the top.
But when we try to start listening while already in the background, we encounter an exception. Below is the logging output:
Recognition loop has started
Starting openAudioDevice on the device.
Audio unit wrapper successfully created.
12:27:41.633 <0x4d89000> AURemoteIO::Initialize failed: -12985 (enable 3, outf< 1 ch, 16000 Hz, Int16> inf< 1 ch, 16000 Hz, Int16>)
Couldn’t initialize audio unit: -12985
openAudioDevice failed
We have set our App to use the background mode plays audio, so that’s why it works in the first scenario. Any thoughts on why we have trouble starting in the background?
Thanks.