Skip to content

Commit d0cad5f

Browse files
committed
Don't use VPIO forcelist by default
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.
1 parent 28166fb commit d0cad5f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ itertools = "0.11"
2626

2727
[features]
2828
audio-dump = []
29+
vpio-forcelist = []
2930

3031
# Workaround for https://github.com/rust-lang/cargo/issues/6745 to allow this
3132
# Cargo.toml file to appear under a subdirectory of a workspace without being in

src/backend/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -3266,6 +3266,7 @@ impl<'ctx> CoreStreamData<'ctx> {
32663266
}
32673267

32683268
#[allow(non_upper_case_globals)]
3269+
#[cfg(feature = "vpio-forcelist")]
32693270
fn should_force_vpio_for_input_device(id: AudioDeviceID) -> bool {
32703271
assert!(id != kAudioObjectUnknown);
32713272
debug_assert_running_serially();
@@ -3283,6 +3284,11 @@ impl<'ctx> CoreStreamData<'ctx> {
32833284
}
32843285
}
32853286

3287+
#[cfg(not(feature = "vpio-forcelist"))]
3288+
fn should_force_vpio_for_input_device(_id: AudioDeviceID) -> bool {
3289+
false
3290+
}
3291+
32863292
fn should_block_vpio_for_device_pair(
32873293
&self,
32883294
in_device: &device_info,

0 commit comments

Comments
 (0)