AEC ( Echo Cancellation Support ) in OSX Using AudioQueue
Asked Answered
E

2

9

I am developing VOIP Application on OSX and iOS and will be using AudioQueue for Audio flow, what want to Know is, by default does AudioQueue support acoustic echo cancellation or do we need to add support for it,
If we need to implement, i believe some open source library has to be implemented like Speex are there any Example available shows integration of AudioQueue with Speex or any other library

Erickaericksen answered 18/3, 2013 at 6:39 Comment(1)
Were you able to solve your problem? I am having the same question.Provost
L
21

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.

Lamont answered 18/3, 2013 at 8:52 Comment(2)
The Voice Processing IO unit is available on 10.7 or later: developer.apple.com/library/mac/#documentation/AudioUnit/…Lamont
i am on latest OSX Sdk and set the VoiceProcessingIO but still Echo is coming, any solutionsErickaericksen
D
-1

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;
Decrement answered 26/4, 2015 at 14:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.