The Apple aurioTouch2 demo demonstrates the same iOS-6 issue that I am working with in audio mode for recording audio interrupts.
The scenario is very specific. When a phone call is recorded in the audio recording mode, it answers it (rejecting the call does not cause an error). Then, after freezing, the application returns to focus and cannot continue recording.
Error message: Error AUIOClient_StartIO (2003329396) This error code is translated using the word "what."
The aurioTouch2 project was an update for iOS-5, but does not work for iOS-6. It seems like a pretty critical mistake for my application, as the device is a "phone".
I tried all the reasonable variations with no luck. Does anyone face the same problem? Many thanks.
Edit: Here is the code that fixed it for me. Correction is noted in the comments. Not quite elegant, but I'll take something at this point.
This method is called at some point after the application has returned to its active state. My interrupt trigger sets a flag, and then, when everything comes to life, I check the flag and then call this method here.
-(void) handleEndInterruption { // Reset audio session UInt32 category = kAudioSessionCategory_PlayAndRecord; AudioSessionSetProperty ( kAudioSessionProperty_AudioCategory, sizeof (category), &category ); // Reactivate the current audio session AudioSessionSetActive(YES); // Do this, and fail with: AUIOClient_StartIO failed (2003329396) [self createAUProcessingGraph]; [self initializeAndStartProcessingGraph]; // Do it a second time and it works AudioSessionSetActive(NO); AudioSessionSetActive(YES); [self createAUProcessingGraph]; [self initializeAndStartProcessingGraph]; // Restore open al context alcMakeContextCurrent([AudioDispatcher sharedInstance].audioContext); // 'unpause' my context alcProcessContext([AudioDispatcher sharedInstance].audioContext); }
ios6 core-audio
Gupton mubes
source share