Don't use VPIO forcelist by default (#244)
This makes it so clients have to opt into the VPIO forcelist. It is currently mainly needed by gecko, since sites may create multiple streams to a builtin device with different prefs and processing params, and HAL audio units to builtin device are not working properly when there is a VPIO audio unit to the same builtin device on (anywhere) on the system. With the cfg flag vpio-forcelist a client can avoid VPIO altogether, by not compiling with the flag, and by never creating input streams with the VOICE pref. Should a client need to mix VOICE and non-VOICE input streams to a single device, it should enable vpio-forcelist. Fixes #242.
This commit is contained in:
Родитель
87024ed394
Коммит
d5e7769e48
|
@ -26,6 +26,7 @@ itertools = "0.11"
|
|||
|
||||
[features]
|
||||
audio-dump = []
|
||||
vpio-forcelist = []
|
||||
gecko-in-tree = ["cubeb-backend/gecko-in-tree"]
|
||||
|
||||
# Workaround for https://github.com/rust-lang/cargo/issues/6745 to allow this
|
||||
|
|
|
@ -3266,6 +3266,7 @@ impl<'ctx> CoreStreamData<'ctx> {
|
|||
}
|
||||
|
||||
#[allow(non_upper_case_globals)]
|
||||
#[cfg(feature = "vpio-forcelist")]
|
||||
fn should_force_vpio_for_input_device(id: AudioDeviceID) -> bool {
|
||||
assert!(id != kAudioObjectUnknown);
|
||||
debug_assert_running_serially();
|
||||
|
@ -3283,6 +3284,11 @@ impl<'ctx> CoreStreamData<'ctx> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "vpio-forcelist"))]
|
||||
fn should_force_vpio_for_input_device(_id: AudioDeviceID) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn should_block_vpio_for_device_pair(
|
||||
&self,
|
||||
in_device: &device_info,
|
||||
|
|
Загрузка…
Ссылка в новой задаче