0

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 ?

YoanGJ
  • 479
  • 5
  • 25

1 Answers1

0

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.

Rhythmic Fistman
  • 34,352
  • 5
  • 87
  • 159
  • Thank's for your answer but I just tried to turn `allowMixingWithOtherApps` on my `AEAudioController` to true but I have still the same issue... – YoanGJ Oct 08 '15 at 12:07