Skip to content

Fix system audio command fallback#24

Merged
ctoth merged 1 commit into
ctoth:masterfrom
akj:fix/audio-fallback-chain-upstream
Jun 14, 2026
Merged

Fix system audio command fallback#24
ctoth merged 1 commit into
ctoth:masterfrom
akj:fix/audio-fallback-chain-upstream

Conversation

@akj

@akj akj commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keeps every available system audio command in priority order instead of selecting only the first command at backend construction time.
  • Falls through to the next command when the primary system command fails, while capturing stderr for diagnostics.
  • Skips commands that cannot handle the file format, e.g. aplay for non-WAV files.
  • Preserves the existing per-command volume argv behavior for paplay, ffplay, afplay, and aplay.

Note

This PR is independent, but #23 fixes a pre-existing cgo malgo test abort that can affect full-suite CI on any branch. Merge #23 first if CI fails in internal/audio/malgo rather than in this changed package.

Test plan

  • go test ./internal/audio
  • go test ./internal/audio ./internal/config ./internal/soundpack ./internal/cli
  • CGO_ENABLED=0 go test ./...

Full go test ./... on this branch hit the pre-existing malgo/PulseAudio abort fixed by #23.

@ctoth

ctoth commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Thanks for working on this!

@ctoth ctoth merged commit 2454655 into ctoth:master Jun 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants