Re: Problems with iOS devices lacking a built-in microphone
Re: Problems with iOS devices lacking a built-in microphone
- Subject: Re: Problems with iOS devices lacking a built-in microphone
- From: Andreas Gustafsson <email@hidden>
- Date: Tue, 19 Mar 2013 20:45:50 +0200
Hi all,
Last week, I asked if there was any example code that correctly
handles a headset disconnect/reconnect while recording on an iOS
device lacking a built-in microphone.
Today, Michael Tyson announced The Amazing Audio Engine, which turned
out to be exactly what I had asked for, and more :)
I tested the TAAE example app on my 3rd gen iPod Touch, and found that
it does successfully record even after headset disconnect/reconnect.
I then noticed that whenever I reconnected the headset, the following
message was logged:
TheEngineSample[330:707] TAAE: Audio session error (rdar://13022588). Power-cycling audio session.
When that message is printed, TAAE will deactivate and then reactivate
the audio session to recover from the error condition. Taking that as
a hint, I changed my own app to call AudioSessionSetActive(false)
whenever the audio input becomes unavailable and
AudioSessionSetActive(true) when it again becomes available, and with
that change, it started working. I'm still getting the
"AURemoteIO::ChangeHardwareFormats: error -10875" log message when
reconnecting the headset, but recording now works.
Many thanks to Michael for publishing the code!
--
Andreas Gustafsson, email@hidden
_______________________________________________
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