Commit 34566aec by PLN (Algolia)

midiviz: force the spectro tap onto the sink monitor

pw-record --target <sink> on PipeWire 1.0.5 ignored the sink and
autoconnected to the default source, so the spectrogram rendered the
room's microphone instead of the rig. stream.capture.sink=true verified
live to link pw-record:input to the target sink's monitor.
parent f7b1b7c5
...@@ -1201,7 +1201,16 @@ class SpectrumSource: ...@@ -1201,7 +1201,16 @@ class SpectrumSource:
# ── capture (the subprocess half) ────────────────────────────────────── # ── capture (the subprocess half) ──────────────────────────────────────
def _cmd(self, target: str) -> list[str]: def _cmd(self, target: str) -> list[str]:
return ["pw-record", "--target", target, "--rate", str(self.rate), # `--target <sink>` alone is not enough on PipeWire 1.0.5: the capture
# stream ignored the sink and autoconnected to the default SOURCE, so
# the spectrograph rendered the room — keyboard clacks included —
# instead of the rig (proven on the live graph 2026-11-01:
# pw-record:input <- sofsoundwire_4__source). `stream.capture.sink`
# forces the monitor of the target sink; verified live that with it
# pw-record:input <- <sink>:monitor_FL/FR.
return ["pw-record", "--target", target,
"-P", "{ stream.capture.sink = true }",
"--rate", str(self.rate),
"--channels", "1", "--format", "f32", "--latency", "100ms", "--channels", "1", "--format", "f32", "--latency", "100ms",
*pw_record_raw_flag(), "-"] *pw_record_raw_flag(), "-"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment