Fix audio bug

This commit is contained in:
NeilClack
2026-03-25 17:17:22 -05:00
parent 8763f70452
commit 205b068fbf
5 changed files with 33 additions and 57 deletions
+6 -6
View File
@@ -301,14 +301,14 @@ func (p *ScrollerPage) Init(ctx *PageCtx) error {
}
// Start audio playback
selectedAudio := p.Base.Context.CfgPtr.SelectedAudio
// selectedAudio := p.Base.Context.CfgPtr.SelectedAudio
assetsDir := p.Base.Context.CfgPtr.AssetsDir
if selectedAudio == "" {
} else {
if err := mixer.Play(filepath.Join(assetsDir, selectedAudio), true, p.Base.Context.CfgPtr); err != nil {
}
audioFile := filepath.Join(assetsDir, "audio/audio.wav")
logger.Info("Attempting to play %s", audioFile)
if err := mixer.Play(audioFile, true, p.Base.Context.CfgPtr); err != nil {
logger.Error("Mixer returned an error: %v", err) // ADD THIS
}
currentDevice := mixer.CurrentDevice()