Skip to content

Commit

Permalink
Do not implicitly prime VPIO when creating any duplex stream
Browse files Browse the repository at this point in the history
The mere existance of VPIO may have side effects. For instance having
VPIO's input side hooked up to the builtin mic of my M2 Macbook Pro
causes a non-VPIO audio unit on the same device to expose three channels
(instead of 1) containing some very-low-volume audio.

With priming, when a client requests a non-VPIO duplex stream using the
builtin mic, it will therefore always get very-low-volume audio.

Having multiple VPIO units on this mic is fine.
  • Loading branch information
Pehrsons committed Mar 25, 2024
1 parent d7121ec commit fcd355f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3032,10 +3032,6 @@ impl<'ctx> CoreStreamData<'ctx> {
shared_voice_processing_unit: &mut SharedVoiceProcessingUnit,
) -> Result<(device_info, device_info)> {
self.debug_assert_is_on_stream_queue();
if self.has_input() && self.has_output() {
shared_voice_processing_unit.prime();
}

let should_use_voice_processing_unit = self.has_input()
&& self.has_output()
&& self
Expand Down

0 comments on commit fcd355f

Please sign in to comment.