AEC ( Echo Cancellation Support ) in OSX Using AudioQueue

半城伤御伤魂 提交于 2019-11-28 23:55:22

As far as I can find, you have to use Audio Units to access the system's echo cancellation. You do that by using kAudioUnitSubType_VoiceProcessingIO instead of kAudioUnitSubType_RemoteIO.

You probably want to use Audio Units anyway, in order to control your latency.

You can use a render callback function to get data from an Audio Queue and pass it to your I/O unit. For outgoing, use AudioUnitRender.

Roozbeh Zabihollahi

Thanks to David and This post, I have realized following changes are required for Echo Cancellation on iOS:

desc.componentSubType = kAudioUnitSubType_VoiceProcessingIO

This will enable hardware Echo suppression according to apple documentation. However, you still need to use specific flags for AudioStream description:

audioFormat.mFormatFlags = kAudioFormatFlagsCanonical;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!