summaryrefslogtreecommitdiff
path: root/internal/gui/audio_player.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-02 17:26:12 +0300
committerPaul Buetow <paul@buetow.org>2026-04-02 17:26:12 +0300
commit4d16684f92544d1cf90dfc5080378ca2f1abe18e (patch)
tree5ba1cf03169c08103b453904f06e1eabe3c3b1d3 /internal/gui/audio_player.go
parent4ccb601df66a6ce6e92ee8146257adbc7d8eece7 (diff)
task 001: remove committed debug printf traces
Diffstat (limited to 'internal/gui/audio_player.go')
-rw-r--r--internal/gui/audio_player.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/internal/gui/audio_player.go b/internal/gui/audio_player.go
index ac8d819..eb96430 100644
--- a/internal/gui/audio_player.go
+++ b/internal/gui/audio_player.go
@@ -241,28 +241,18 @@ func (p *AudioPlayer) SetAutoPlayEnabled(autoPlayEnabled *bool) {
// onPlay handles play button click
func (p *AudioPlayer) onPlay() {
- fmt.Printf("DEBUG (onPlay): Starting playback\n")
- fmt.Printf(" - audioFile: %s\n", p.audioFile)
- fmt.Printf(" - audioFileBack: %s\n", p.audioFileBack)
- fmt.Printf(" - isBgBg: %v\n", p.isBgBg)
- fmt.Printf(" - isPlaying: %v\n", p.isPlaying)
-
if p.audioFile == "" {
- fmt.Printf("DEBUG (onPlay): No audioFile set, returning\n")
return
}
if p.isPlaying {
// Pause functionality - just stop for now
- fmt.Printf("DEBUG (onPlay): Already playing, stopping\n")
p.onStop()
return
}
// Start playing
- fmt.Printf("DEBUG (onPlay): About to start playback for: %s\n", filepath.Base(p.audioFile))
if err := p.startPlayback(); err != nil {
- fmt.Printf("DEBUG (onPlay): Error starting playback: %v\n", err)
p.statusLabel.SetText(fmt.Sprintf("Error: %v", err))
return
}
@@ -271,31 +261,20 @@ func (p *AudioPlayer) onPlay() {
p.playButton.SetIcon(theme.MediaPauseIcon())
p.stopButton.Enable()
p.statusLabel.SetText(fmt.Sprintf("Playing: %s%s", filepath.Base(p.audioFile), p.voiceInfo))
- fmt.Printf("DEBUG (onPlay): Playback started successfully\n")
}
// onPlayBack handles back audio button click (for bg-bg cards)
func (p *AudioPlayer) onPlayBack() {
- fmt.Printf("DEBUG (onPlayBack): Starting back audio playback\n")
- fmt.Printf(" - audioFile: %s\n", p.audioFile)
- fmt.Printf(" - audioFileBack: %s\n", p.audioFileBack)
- fmt.Printf(" - isBgBg: %v\n", p.isBgBg)
- fmt.Printf(" - isPlaying: %v\n", p.isPlaying)
-
if p.audioFileBack == "" {
- fmt.Printf("DEBUG (onPlayBack): No audioFileBack set, returning\n")
return
}
if p.isPlaying {
- fmt.Printf("DEBUG (onPlayBack): Already playing, stopping first\n")
p.onStop()
}
// Start playback using back audio file directly
- fmt.Printf("DEBUG (onPlayBack): About to start playback for back audio: %s\n", filepath.Base(p.audioFileBack))
if err := p.startPlaybackForFile(p.audioFileBack); err != nil {
- fmt.Printf("DEBUG (onPlayBack): Error starting playback: %v\n", err)
p.statusLabel.SetText(fmt.Sprintf("Error: %v", err))
return
}
@@ -304,14 +283,12 @@ func (p *AudioPlayer) onPlayBack() {
p.playBackButton.SetIcon(theme.MediaPauseIcon()) // Back button, not front
p.stopButton.Enable()
p.statusLabel.SetText(fmt.Sprintf("Playing back audio: %s", filepath.Base(p.audioFileBack)))
- fmt.Printf("DEBUG (onPlayBack): Back audio playback started successfully\n")
}
// onStop handles stop button click
func (p *AudioPlayer) onStop() {
if p.playCmd != nil && p.playCmd.Process != nil {
if err := p.playCmd.Process.Kill(); err != nil {
- fmt.Printf("DEBUG (onStop): Failed to kill playback process: %v\n", err)
p.statusLabel.SetText(fmt.Sprintf("failed to stop playback: %v", err))
}
p.playCmd = nil