All,
I would like to disable VoiceProcessingIO. When I compare the results I get with various filters enabled/disabled and I see no difference. I’m probably doing something wrong, but I haven’t found anything in the documentation that shows how the VPIO integrates with the audio system. Maybe it’s not available when using AudioQueues?
Can somebody sanity-check me?
// Initialize with AudioSessionInitialize(...)
// Set audio category to kAudioSessionCategory_RecordAudio
// AudioSessionSetActive(true);
// Disable voice processing IO
AudioComponentDescription desc;
desc.componentType = kAudioUnitType_Output;
desc.componentSubType = kAudioUnitSubType_VoiceProcessingIO;
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
AudioComponent comp = AudioComponentFindNext(NULL, &desc);
AudioUnit vpioUnit;
AudioComponentInstanceNew(comp, &vpioUnit);
// Turn everything off
const UInt32 kInputBus = 1;
const UInt32 >
const UInt32 zero = 0;
AudioUnitSetProperty(vpioUnit, kAUVoiceIOProperty_BypassVoiceProcessing, kAudioUnitScope_Global, kInputBus, &one, sizeof(one));
AudioUnitSetProperty(vpioUnit, kAUVoiceIOProperty_VoiceProcessingEnableAGC, kAudioUnitScope_Global, kInputBus, &zero, sizeof(zero));
AudioUnitSetProperty(vpioUnit, kAUVoiceIOProperty_DuckNonVoiceAudio, kAudioUnitScope_Global, kInputBus, &zero, sizeof(zero));
The remaining code sets up the ASBD for Linear PCM, creates & allocates audio queues, enqueues them finally calls AudioQueueStart to begin recording.