Changing audio session and disabling recording when moving to background
Changing audio session and disabling recording when moving to background
- Subject: Changing audio session and disabling recording when moving to background
- From: Michael Tyson <email@hidden>
- Date: Tue, 08 Nov 2011 23:05:01 +0100
Hey list,
I'm working on my live-looping iOS app, which runs in the record & play audio session, normally. It supports background audio, but the problem is, as it's in the record & play category with an IO unit with record running, users are always faced with a red pulsing bar at the top when the app is backgrounded.
I don't see any great need to continue recording when the app's in the background (but I *do* want it to be able to continue playing), and I was wondering - is there a way to temporarily disable recording, so that the app's a little less visible in the background?
I've tried changing the audio session to just MediaPlayback, but this appears to make no difference while everything's running. I thought setting kAudioOutputUnitProperty_EnableIO to 0 on the audio unit might work, but this parameter can only be set before the audio unit's initialised.
So, the only way I can think to disable recording when moving to the background is to stop, destroy, recreate and start the graph again, but that's a pretty big disruption to the audio, and sounds like overkill.
Anyone have any ideas?
Thanks muchly!
Michael
--
Michael Tyson | atastypixel.com
A Tasty Pixel: Artisan apps
aim: mikerusselltyson
twitter: MichaelTyson
_______________________________________________
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