These tests cover parseSinkLine and parseSinks, which parse the output of
wpctl status. Both functions will be removed in the next commit as part of
migrating away from PipeWire/wpctl to pure SDL_mixer volume control.
- 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.
Play() held mu then called SwitchDevice() which also tried to acquire mu,
causing a deadlock. Replace with direct call to openDeviceLocked() which
does not lock.
Add regression test that verifies Play() returns an error (not deadlock)
when called on an uninitialized mixer.
Remove dead 'currentVolume' variable that was never written to, causing
SwitchDevice to always restore volume to 0 after switching audio devices.
- Remove currentVolume from package state
- SwitchDevice now sets mix.MAX_VOLUME after reopening device
- GetVolume128 now queries SDL directly instead of reading stale variable
- Add unit tests for parseSinks, parseSinkLine, and ConvertVolume
- Add changelog.txt tracking all audio bug fixes