Add moonmix: pavucontrol-style PipeWire mixer in MoonBit (WirePlumber + GTK4) #1

Merged
nandi merged 11 commits from geordi/moonmix-v1 into main 2026-11-22 23:52:37 +00:00
11 Commits
Author SHA1 Message Date
SpriteandClaude Opus 5.5 bbef4b8ef7 fix: play a WAV file with pw-play in the smoke test
CI / check (pull_request) Successful in 9s
CI / native (pull_request) Successful in 1m3s
In CI (PipeWire 1.4) pw-cat playing raw audio never created a stream,
from /dev/zero or from a regular file, so the Playback tab and the move
action could not be tested. Play a generated WAV file with pw-play
instead (header written in shell; the container has no python) and log
the player's exit status for diagnosis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:14:00 +00:00
SpriteandClaude Opus 5.5 4147eaeaa4 fix: let WirePlumber settle before the smoke test starts streams
CI / check (pull_request) Successful in 10s
CI / native (pull_request) Failing after 1m33s
Streams that appear while WirePlumber is still starting up can wedge its
event queue: no default sink is chosen, nothing is linked and volume
changes are dropped. This made the smoke test fail intermittently
locally and in CI. The test now polls moonmix-probe until a default sink
exists before starting the streams, then until the playback stream is
linked; four local runs in a row pass.

Also play a regular file instead of /dev/zero (PipeWire 1.4's pw-cat
exited silently on it in CI) and change the volume of the active sink,
since CI's PipeWire 1.4 did not apply a volume set on a suspended
null sink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:03:55 +00:00
SpriteandClaude Opus 5.5 6c7f45d5f9 fix: make the smoke test check results and avoid a WirePlumber stall
CI / check (pull_request) Successful in 9s
CI / native (pull_request) Failing after 1m4s
The smoke test only checked exit codes, so CI passed the probe steps
even though volume and mute never changed. Each step now asserts the
expected state after the action and prints pw-cat, WirePlumber and node
diagnostics on failure.

The test microphone was a null-audio-sink with a Source media class.
WirePlumber's event dispatcher intermittently stalls on such a node and
then links nothing and ignores volume changes, which is what failed in
CI. It is now a loopback virtual source, like echo-cancel; three local
runs in a row pass. Screenshots are re-rendered from the new setup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:58:18 +00:00
SpriteandClaude Opus 5.5 b18ab7aed1 fix: run native model tests in the trixie CI job
Linking MoonBit's native runtime on the bullseye runner fails with
undefined pthread symbols (glibc 2.31 needs -lpthread), so the check
job now only runs the wasm-gc tests and the native model tests move to
the debian:trixie job that already builds natively.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:58:12 +00:00
SpriteandClaude Opus 5.5 5d74201d0c chore: Gitea Actions CI
CI / check (pull_request) Failing after 11s
CI / native (pull_request) Failing after 1m38s
Pure check and test job on the default runner; native build and
headless smoke test in a debian:trixie container (bullseye lacks
WirePlumber 0.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:29:58 +00:00
SpriteandClaude Opus 5.5 6dd89a3559 chore: README with architecture, dependencies and build steps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:29:58 +00:00
SpriteandClaude Opus 5.5 169fb542df chore: headless smoke test and screenshots
tools/smoke-test.sh starts a private PipeWire + WirePlumber with null
sinks/source and test streams, exercises every action through
moonmix-probe and renders the GUI offscreen under broadway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:28:51 +00:00
SpriteandClaude Opus 5.5 91d3bb68bb feature: GTK4 GUI with pavucontrol-style tabs
Hand-written minimal GTK4 binding (one dispatch callback, tag table,
signal suppression during programmatic updates) and the GUI: Playback,
Recording, Output Devices and Input Devices tabs with linked volume
sliders up to 150%, mute, default-device toggle and per-stream device
selector, updated live by diffing view rows. Includes a .desktop file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:28:51 +00:00
SpriteandClaude Opus 5.5 c55883b8ad feature: WirePlumber binding and headless probe
Thin C layer over libwireplumber-0.5: an object manager for audio
nodes, links and the default metadata, plus the mixer-api and
default-nodes-api plugins (what wpctl uses internally) for volume, mute
and defaults. Streams are moved by setting target.object in the default
metadata, as pipewire-pulse does. No CLI tools are spawned.

tools/pkg-cc wraps the C compiler to append pkg-config flags because
moon does not expand $(pkg-config ...) in moon.pkg link options.

moonmix-probe prints what each tab shows and can apply one action.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:28:50 +00:00
SpriteandClaude Opus 5.5 c7314f4188 chore: add sweet release configuration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:05:41 +00:00
SpriteandClaude Opus 5.5 7b2b45067f feature: pure volume model, graph state reducer and view model
Cubic percent <-> linear channelVolumes conversions (pavucontrol scale,
up to 150%), dB formatting, balance-preserving linked slider, a reducer
applying WirePlumber node/link/default events and per-tab view rows,
all covered by moon tests that run on any target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:59:55 +00:00