mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[GH-ISSUE #465] POST /api/v1/apps/add drops start_audio_server: apps added through the API get no audio #285
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#285
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @WMP on GitHub (Jul 25, 2026).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/465
Summary
POST /api/v1/apps/addsilently discardsstart_audio_server. The field isrequired by the endpoint's own schema, but it never reaches the stored
App:reading the app back always reports
false, and thatfalseis what getspersisted to
config.toml. Apps created through the API therefore run withoutan audio server — the virtual compositor works, but there is no sound.
Apps defined directly in
config.tomlare unaffected (that path reads thefield correctly, defaulting to
truewhen absent), so this only bites anythingthat manages the app list through the API.
Reproduce
Send
POST /api/v1/apps/addover the API socket (WOLF_SOCKET_PATH, in my case/tmp/sockets/wolf.sock) with a payload copied from an existing app, changingonly
title,idandstart_audio_server: true. Wolf answers{"success":true}.Then
GET /api/v1/appsreports the new app as:start_audio_serverwastruein the request, andconfig.tomlgetsstart_audio_server = falsefor that app too.start_virtual_compositorin thevery same request survives, which is what makes this look like a field-mapping
slip rather than a validation problem.
What it looks like from the user side
Launching such an app: the session starts, the Wayland socket appears, video
streams fine. Inside the app PulseAudio has only
auto_null, novirtual_sink_<session_id>, so every stream lands in the null sink:Moonlight gets silence. Flipping
start_audio_server = trueby hand inconfig.tomland restarting Wolf fixes it immediately, which confirms only theAPI path is affected.
Root cause
Reflector<events::App>::to()insrc/moonlight-server/events/reflectors.hppbuilds the
events::Appwithoutstart_audio_server, so the aggregateinitialisation leaves it
false:The opposite direction is fine —
from()(same file) copiesstart_audio_server, which is why the value round-trips correctly for apps thatcame from
config.toml, and why the API reports the wrong value rather thandropping the key.
configTOML.cpphandles it in both directions too(
.start_audio_server = app.start_audio_server.value_or(true)on read,serialised back on write).
Fix
One line in
to():Happy to open a PR with that.
Environment
ghcr.io/games-on-whales/wolf:stable,sha256:ff82c125c9b79b2e9443de2b0eaec40c904edb03291680d408cccd57c1d59c76(stable@d6d41de)