简体   繁体   English

iOS 6上的RemoteIO和记录AAC

[英]RemoteIO and Recording AAC on iOS 6

Is anyone using RemoteIO for recording AAC audio on iOS 6? 是否有人使用RemoteIO在iOS 6上录制AAC音频? 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. 我注意到执行此操作时,它会在中断时杀死媒体服务器,并且在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? 还有其他人看到或解决此问题吗?

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. 在我使用kAppleHardwareAudioCodecManufacturer ...之前,显然硬件编解码器无法处理中断。 Hope others find this useful! 希望其他人觉得有用!

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: 我正尝试使用remoteio录制AAC音频,原因几乎与您在此处描述的相同原因相同:

http://lists.apple.com/archives/coreaudio-api/2012/Oct/msg00135.html 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. 我快要死掉的基本流程是:-设置用于记录的活动音频会话-设置音频单元和文件以为用户按下“记录”按钮做准备-用户为应用程序添加背景,以便拆除所有内容处理我的音频单元并停用会话,但是此时我不清理extaudio文件-我打开语音备忘录,然后立即将其关闭-重新打开我的应用并刷新记录。 - when I try and set the session to active, mediaserverd dies. -当我尝试将会话设置为活动时,mediaserverd死亡。 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. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM