fix: resolve 4 critical audio mixer bugs (v0.5)

- SwitchDevice volume silently zeroed: Init uses cfg.SavedVolume,
  SwitchDevice restores saved volume after reopening device
- SwitchDevice not persisted to database: caller saves SelectedAudioDevice
- Device restore passes invalid 'system default' to SDL: now passes ''
- Stop() no-op when audio toggled off: removed AudioEnabled guard

Regression tests added for all 4 bugs. CI now runs go test before build.
This commit is contained in:
NeilClack
2026-07-11 11:39:58 -05:00
parent 72910e7006
commit bb132ceeaf
8 changed files with 150 additions and 34 deletions
+5
View File
@@ -17,6 +17,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6
- name: Test
run: |
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
nix develop --command go test ./internal/mixer/ -v -timeout 30s
- name: Build
run: |
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
+5
View File
@@ -17,6 +17,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6
- name: Test
run: |
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
nix develop --command go test ./internal/mixer/ -v -timeout 30s
- name: Build
run: |
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh