fix(host/audio): drive the Linux virtual mic with RT_PROCESS (was silent)
The punktfunk-mic PipeWire source connected without RT_PROCESS, so it ran as an async/main-loop node. In the host's busy multi-stream graph (desktop audio + video capture + the session) it never acquired a driver, stayed suspended, and its process() callback never fired — every recorder reading the remote mic heard pure silence (the long-standing "Linux host mic broken"). Connect the mic stream with RT_PROCESS so it is a synchronous node that joins its consumer's driver group and is actually driven. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -320,11 +320,18 @@ fn mic_pw_thread(
|
|||||||
.into_inner();
|
.into_inner();
|
||||||
let mut params = [Pod::from_bytes(&values).context("mic pod from bytes")?];
|
let mut params = [Pod::from_bytes(&values).context("mic pod from bytes")?];
|
||||||
|
|
||||||
|
// RT_PROCESS: run the producer callback on PipeWire's realtime data loop, so the source is a
|
||||||
|
// *synchronous* graph node that joins its consumer's driver group and is actually driven. Without
|
||||||
|
// it the node is async/main-loop and, in the host's busy multi-stream graph (desktop-audio +
|
||||||
|
// video capture + the session), never acquires a driver — it stays suspended and its process()
|
||||||
|
// never fires, so every recorder hears pure silence (the long-standing "Linux host mic broken").
|
||||||
stream
|
stream
|
||||||
.connect(
|
.connect(
|
||||||
spa::utils::Direction::Output, // we PRODUCE samples (a source)
|
spa::utils::Direction::Output, // we PRODUCE samples (a source)
|
||||||
None,
|
None,
|
||||||
pw::stream::StreamFlags::AUTOCONNECT | pw::stream::StreamFlags::MAP_BUFFERS,
|
pw::stream::StreamFlags::AUTOCONNECT
|
||||||
|
| pw::stream::StreamFlags::MAP_BUFFERS
|
||||||
|
| pw::stream::StreamFlags::RT_PROCESS,
|
||||||
&mut params,
|
&mut params,
|
||||||
)
|
)
|
||||||
.context("pw mic stream connect")?;
|
.context("pw mic stream connect")?;
|
||||||
|
|||||||
Reference in New Issue
Block a user