Merge origin/main into better-icons
CI / check (pull_request) Failing after 10s
CI / native (pull_request) Successful in 1m9s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
SpriteandClaude Sonnet 5.5 committed 2026-11-23 00:48:27 +00:00
commit 3ac96fea35
16 files changed
+503 -18

No files matched your search

+16 -4
View File
@@ -24,6 +24,10 @@ on top of libpipewire-0.3. It never runs `wpctl`, `pactl`, `pw-cli`,
- **Recording**: capture streams, same controls, input device selector.
- **Output Devices** / **Input Devices**: sinks and sources with volume, mute
and a *Default* toggle that shows and sets the default device.
- **Live peak meters** under each slider on Playback, Output Devices and
Input Devices, on the same cubic scale as the slider. Only the visible
tab is metered; meters on outputs and app streams are passive, so they
never keep an idle device running.
- Volumes in percent exactly like pavucontrol/wpctl: the cubic mapping of
PipeWire's linear `channelVolumes`, up to 150%, with the dB value next to
it. One slider moves all channels, keeping the channel balance.
@@ -32,7 +36,7 @@ on top of libpipewire-0.3. It never runs `wpctl`, `pactl`, `pw-cli`,
show up immediately.
Not yet included: the Configuration tab (card profiles), per-channel
sliders, peak meters, monitor sources in Input Devices.
sliders, monitor sources in Input Devices, meters for recording streams.
## Architecture
@@ -62,7 +66,13 @@ flowchart LR
route, which is where pavucontrol's numbers live. The **default-nodes-api**
plugin reads and sets the default sink and source. To move a stream,
moonmix sets `target.object` in the `default` metadata, as pipewire-pulse
does for pavucontrol. The C layer sends MoonBit one callback per change,
does for pavucontrol. Peak meters are small capture `pw_stream`s on
WirePlumber's own `pw_core`, created with the properties pipewire-pulse
gives pavucontrol's peak streams (`stream.monitor`, `target.object`,
`stream.capture.sink` for sinks); their `process` callback only folds
samples into a peak value that a 40 ms GUI timer reads and resets. Nodes
with `stream.monitor` (ours and pavucontrol's) are hidden from the tabs.
The C layer sends MoonBit one callback per change,
`(kind, id)`. MoonBit then pulls node properties and volumes through small
accessor functions, so no C structs cross the FFI boundary.
- **One main loop.** WirePlumber and GTK4 both run on the default GLib main
@@ -157,6 +167,7 @@ $P volume alsa_output.pci-0000_00_1f.3.analog-stereo 40
$P mute 57 1 # node id or node.name
$P default bluez_output.XX_XX.1
$P move <stream-id> <sink-id-or-name>
$P meter <id> # peak over ~1.5 s; exit 6 if silent
```
## Testing
@@ -169,8 +180,9 @@ tools/smoke-test.sh /tmp/shot # needs pipewire, wireplumber, pw-cat, gtk4-
`tools/smoke-test.sh` starts a private PipeWire and WirePlumber in a temp
`XDG_RUNTIME_DIR`. The instance has two null sinks, a loopback virtual
microphone, and one playback and one capture stream created with `pw-cat`; the CLI is used only
by the test harness. The script runs every probe action and checks its effect,
microphone, one playback stream of noise and one capture stream created with `pw-cat`; the CLI is used only
by the test harness. The script runs every probe action and checks its effect, checks that peak
meters on the stream and its sink see the signal,
then starts the GUI under GTK's broadway backend. With `MOONMIX_SCREENSHOT`
set, the GUI renders each tab offscreen to a PNG and exits.