1

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

frankWhite
  • 1,523
  • 15
  • 21

1 Answers1

1

I find answer why this error occurred: in Novocaine AudioComponentDescription init as:

inputDescription.componentSubType = kAudioUnitSubType_RemoteIO;

but in my my case correct:

inputDescription.componentSubType = kAudioUnitSubType_VoiceProcessingIO;

After some experiments I concluded that after using kAudioUnitSubType_VoiceProcessingIO echo disable but not completely. May be I don't correctly use it.

frankWhite
  • 1,523
  • 15
  • 21