0
votes

I have a problem using The Amazing Audio Engine library I think.

In fact, when I'm trying to play a back track and record with the microphone at the same time, at the end of the record, when I'm entering in this method:

func captureOutput(captureOutput: AVCaptureFileOutput!, didFinishRecordingToOutputFileAtURL outputFileURL: NSURL!, fromConnections connections: [AnyObject]!, error: NSError!)

I have this error:

Error Domain=AVFoundationErrorDomain Code=-11818 "Enregistrement arrêté" UserInfo={NSUnderlyingError=0x15d5a4cd0 {Error Domain=NSOSStatusErrorDomain Code=-16414 "(null)"}, AVErrorRecordingSuccessfullyFinishedKey=true, NSLocalizedRecoverySuggestion=Arrêtez toute autre action effectuée avec l’appareil d’enregistrement puis réessayez., NSLocalizedDescription=Enregistrement arrêté}

For the video record I use, AVCaptureSession and for the audio play and the audio record, I use The Amazing Audio Engine.

Do you have any idea of the problem ?

1
Are you setting an audio session? You need play and record. I don't know if TAAE handles this for you. - Rhythmic Fistman
@RhythmicFistman Yes, TAAE handles this for me. Everything works (audio & video recording) but I have just this error above. - YoanGJ

1 Answers

0
votes

Error -11818 means AVErrorSessionWasInterrupted - which means that some other app interrupted your audio session. Confusingly, this can be due to the other app doing something on your behalf, like decoding video.

To fix the problem you need to enable the category option AVAudioSessionCategoryOptions.MixWithOthers

I guess the TAAE way of doing this would be to enable allowMixingWithOtherApps on your AEAudioController object.