From ca4a3b77542f04fb8aeb2e3a2d976e352bbec9f7 Mon Sep 17 00:00:00 2001 From: Nick McInnis Date: Mon, 14 Sep 2026 13:08:28 -0400 Subject: [PATCH] Desktop: the Linux installers ask for GStreamer, which the audio needs WebKitGTK has no audio stack of its own. Web Audio and decodeAudioData both run through GStreamer, and the element it reaches for is `autoaudiosink` from the "good" plugin set. A Linux box without it runs the machine perfectly and plays nothing: no error, no warning, just silence, which is a miserable thing to hand someone who has just installed a drum machine. The .deb declared no dependencies at all and the .rpm none either, so both could install onto exactly that. Declare webkit2gtk, gtk3 and the base/good GStreamer plugins on each. The AppImage already carries its own copies via linuxdeploy-plugin-gstreamer, so only the bare `cargo build` binary is left needing the system packages, and DESKTOP.md now says so with the command. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_019U7kCMZc9a7sezDwKKseJy --- docs/DESKTOP.md | 17 ++++++++++++++++- src-tauri/tauri.conf.json | 14 +++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/docs/DESKTOP.md b/docs/DESKTOP.md index 00a972d..02a3b78 100644 --- a/docs/DESKTOP.md +++ b/docs/DESKTOP.md @@ -41,11 +41,26 @@ for installers under `src-tauri/target/release/bundle/`. | | Windows (WebView2) | macOS (WebKit) | Linux (WebKitGTK) | |---|---|---|---| -| Playing, sequencing, disk | yes | yes | yes | +| Playing, sequencing, disk | yes | yes | yes, with the GStreamer plugins below | | Sampling from the microphone | yes, with a permission prompt | yes; `Info.plist` carries the usage text | yes, where PipeWire or PulseAudio is present | | Web MIDI | yes | no: WebKit has no Web MIDI | no | | `.CHOPDECK` files open the app | registered by the installer | registered | registered by the `.deb` | +**Linux needs GStreamer, and fails silently without it.** WebKitGTK has no audio stack of its own: +Web Audio and `decodeAudioData` both run through GStreamer, so a machine missing the output elements +runs the machine perfectly and plays nothing — no error, no warning, just silence. The element +WebKitGTK reaches for is `autoaudiosink`, which lives in the "good" plugin set, and MP3 and M4A +decoding wants `gst-libav` on top. The installers declare these (`bundle.linux.deb.depends` and +`.rpm.depends`) and the AppImage carries its own copies via `linuxdeploy-plugin-gstreamer`, so this +only bites when running the bare binary from `cargo build`: + +``` +sudo pacman -S gst-plugins-good gst-libav # Arch +sudo apt install gstreamer1.0-plugins-good gstreamer1.0-libav # Debian / Ubuntu +``` + +Check with `gst-inspect-1.0 autoaudiosink`. If that says "No such element", the app will be silent. + The builds are not code-signed yet. macOS will refuse to open the app until you right-click it and choose Open once; Windows SmartScreen asks for confirmation. Signing (an Apple Developer ID and a Windows certificate) is the step to take before listing on itch.io or Steam, and it is only secrets diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 7e46100..d65428b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -53,7 +53,19 @@ "minimumSystemVersion": "11.0" }, "linux": { - "deb": { "depends": [] } + "deb": { + "depends": [ + "gstreamer1.0-plugins-base", + "gstreamer1.0-plugins-good", + "gstreamer1.0-pulseaudio" + ] + }, + "rpm": { + "depends": [ + "gstreamer1-plugins-base", + "gstreamer1-plugins-good" + ] + } } } }