in src/backend/mod.rs [1409:1432]
fn create_voiceprocessing_audiounit() -> Result<VoiceProcessingUnit> {
let res = create_typed_audiounit(kAudioUnitSubType_VoiceProcessingIO);
if res.is_err() {
return Err(Error::error());
}
match get_default_device(DeviceType::OUTPUT) {
None => {
cubeb_log!("Could not get default output device in order to undo vpio ducking");
}
Some(id) => {
let r = audio_device_duck(id, 1.0, ptr::null_mut(), 0.5);
if r != NO_ERR {
cubeb_log!(
"Failed to undo ducking of voiceprocessing on output device {}. Proceeding... Error: {}",
id,
r
);
}
}
};
res.map(|unit| VoiceProcessingUnit { unit })
}