I use Novocaine framework https://github.com/alexbw/novocaine, if I pause input unit (but output is working) from mic and then play it again in result I get echo. In apple documentation I see Voice-Processing I/O Audio Unit Properties - kAUVoiceIOProperty_DuckNonVoiceAudio. I try:
UInt32 zero = 0;
CheckError( AudioUnitSetProperty(inputUnit,
kAUVoiceIOProperty_DuckNonVoiceAudio,
kAudioUnitScope_Global,
kInputBus,
&zero,
sizeof(UInt32)), "ERROR");
in method setupAudio
in result I have
ERROR (-10879)
In documentation I don't find description. In general, how I can make implement echo cancellation in iOS for audioUnits? I think problem maybe not in this property (becouse by default it should be enabled).. I find this great article - http://atastypixel.com/blog/developing-loopy-part-2-implementation/ author say about correlation signals and their subtraction.. for this case I think I need adaptive filter, but if it possible implement for iOS?
Any ideas?
Thanks in advance