Evan--
So were you able to handle the interruption correctly? I just hit this problem tonight -- when I get and dismiss an incoming call, I can't re-start my RemoteIO audio unit. Thinking that Core Audio nuked my audio to service the ringtone, I tried disposing of my old RIO:
if (inInterruptionState == kAudioSessionBeginInterruption) { [vc stopPlaying]; [vc.playStopButton setSelected: NO]; // dispose of audio unit AudioUnitUninitialize(vc.remoteIOUnit); AudioComponentInstanceDispose(vc.remoteIOUnit); vc.remoteIOUnit = NULL;
And in the end-interruption case, I re-call my audio unit setup method. It finds and instantiates the RIO and sets the properties I need (again), but then fails on this:
setupErr = AudioUnitInitialize(remoteIOUnit);
with the same error code you mentioned, kAudioSessionNotActiveError.
So I tried also (re-)initializing the audio session, but I get kAudioSessionAlreadyInitialized when I call AudioSessionInitialize.
Did you get your end-interruption handler working, and did you see any of these problems in the process?
Thanks in advance.
--Chris
On March 3, 2009 8:25:01 AM EST, Evan Olcott wrote: Date: March 3, 2009 8:25:01 AM EST
Subject: Re: AURemoteIO returning an error on AudioOutputUnitStart
On Mar 3, 2009, at 4:15 AM, Mark's Studio wrote:
In AudioServices.h
kAudioSessionNotActiveError = '!act'
Wow. I get the RTFM award for the day. Thanks, Peter.
(I wish Spotlight searches would pull up this stuff)
|