Skip to content

Commit 4fd89b8

Browse files
committed
Undo ducking from the shared VPIO unit after creation
1 parent 31d5ab3 commit 4fd89b8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/backend/mod.rs

+17
Original file line numberDiff line numberDiff line change
@@ -2174,6 +2174,23 @@ impl SharedVoiceProcessingUnit {
21742174
return;
21752175
}
21762176
cubeb_log!("Shared voiceprocessing unit primed and ready");
2177+
2178+
match get_default_device(DeviceType::OUTPUT) {
2179+
None => {
2180+
cubeb_log!("Could not get default output device in order to undo vpio ducking");
2181+
},
2182+
Some(id) => {
2183+
let r = audio_device_duck(id, 1.0, ptr::null_mut(), 0.5);
2184+
if r != NO_ERR {
2185+
cubeb_log!(
2186+
"Failed to undo ducking of voiceprocessing on output device {}. Proceeding... Error: {}",
2187+
id,
2188+
r
2189+
);
2190+
}
2191+
}
2192+
};
2193+
21772194
let old_storage = guard.storage.replace(Arc::from(Mutex::new(unit.ok())));
21782195
assert!(old_storage.is_none());
21792196
});

0 commit comments

Comments
 (0)