Question

Is anyone using RemoteIO for recording AAC audio on iOS 6? I've noticed that when I'm doing this, it kills the media server on interruption and my interruption callbacks are never called on iOS 6.0.

Also, because the media server goes down, it makes recovering a bit difficult.

Is anyone else seeing this or worked around it?

Was it helpful?

Solution

Problem solved. Use the software codec:

// specify codec
UInt32 codec    = kAppleSoftwareAudioCodecManufacturer;
int codecSize   = sizeof(codec);
status          = ExtAudioFileSetProperty(recorderState.audioFile,
                                          kExtAudioFileProperty_CodecManufacturer,
                                          codecSize,
                                          &codec);

Before I was using kAppleHardwareAudioCodecManufacturer... evidently the hardware codec can't handle interruptions. Hope others find this useful!

OTHER TIPS

I am having a similar problem. I am trying to record AAC audio using remoteio, for pretty much all the same reasons you described here:

http://lists.apple.com/archives/coreaudio-api/2012/Oct/msg00135.html

My current problem isn't even with interuptions. If I dispose of my audio unit and set my audio session to inactive on being moved to the background, I still have the media server get killed when I try to reactivate my session when the app reloads.

My basic flow that is dying is this: - set up an active audio session for recording - setup an audio unit & and file in preparation for the user pressing the 'record' button - user backgrounds the app, in order to tear down everything I dispose of my audio unit and deactivate my session, but I don't clean up my extaudiofile at this point - I open voice memos, and then immediately close it - reopen my app and hit record. - when I try and set the session to active, mediaserverd dies. Switching to the software codec didn't fix it!

If you have learned any more about this craziness I would love to hear what you figured out.

Thanks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top