opentok-ios-sdk-samples icon indicating copy to clipboard operation
opentok-ios-sdk-samples copied to clipboard

AGC and (AEC,NS) support at Audio Unit level

Open IGitGotIt opened this issue 8 months ago • 0 comments

       UInt32 bypassVoiceProcessing = self.disableAudioProcessing;
        CheckError(AudioUnitSetProperty(*voice_unit,
                                       kAUVoiceIOProperty_BypassVoiceProcessing,
                                       kAudioUnitScope_Global,
                                       kInputBus,
                                       &bypassVoiceProcessing,
                                        sizeof(bypassVoiceProcessing)),
                   @"kAUVoiceIOProperty_BypassVoiceProcessing failed");
        UInt32 enableAGC = self.enableAGC;
        CheckError(AudioUnitSetProperty(*voice_unit,
                                       kAUVoiceIOProperty_VoiceProcessingEnableAGC,
                                       kAudioUnitScope_Global,
                                       kInputBus,
                                       &enableAGC,
                                       sizeof(enableAGC)),
                   @"kAUVoiceIOProperty_VoiceProcessingEnableAGC failed");

and instantiated with

    OTDefaultAudioDeviceWithVolumeControl* audioDevice =
    [[OTDefaultAudioDeviceWithVolumeControl alloc] initWithAGC:YES disableAudioProcessing:NO];

IGitGotIt avatar May 30 '24 20:05 IGitGotIt