fangorn/sunshine-qemu
public
ref:fc18594daf72ace5bc4097c903a43d0211289c6e
fix(e2e): stop converting the VM's sound twice
QEMU's audiodev keeps its own 44100 Hz default whatever the guest plays, so a guest at 48 kHz had its sound
resampled down to 44.1 kHz by QEMU's mixer and back up to 48 kHz by Sunshine, for a constant grain on the
sound. The guests now start with out.frequency=48000, which is what Moonlight's Opus stream uses: QEMU passes
the frames through and Sunshine's resampler is a no-op.
Sunshine also says so when a VM's rate doesn't match the stream, with the QEMU option that fixes it, since
nothing else makes the double conversion visible.
Measured after the change on the desktop guest playing a 440 Hz tone: 3948 packets, none lost, no decode
errors, 440.001 and 440.000 Hz per channel, no silent blocks.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BPNw4PCgkEfhyCjQT19wsb
SHA:
fc18594daf72ace5bc4097c903a43d0211289c6e
Author:
Cole Christensen <cole.christensen@gmail.com>
Date:
2026-09-17 20:00
Parents:
a604b63
5 files changed
+35
-3
| Type | ||
|---|---|---|
|
|
docs/qemu.md | +23 −0 |
|
||
|
|
src/platform/linux/qemu/audio.cpp | +9 −0 |
|
||
|
|
tests/e2e/qemu/desktop/run_desktop.sh | +1 −1 |
|
||
|
|
tests/e2e/qemu/run_vm.sh | +1 −1 |
|
||
|
|
tests/e2e/qemu/steamos/run_steamos.sh | +1 −1 |
|
||