From cc3d55fe08fa499f36e855e8fc3c57b4188c441e Mon Sep 17 00:00:00 2001 From: raziman Date: Sat, 4 Jul 2020 10:17:52 +0800 Subject: [PATCH] fix volume bug --- player.go | 2 +- start.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/player.go b/player.go index 643a51f..9f11e7c 100644 --- a/player.go +++ b/player.go @@ -186,7 +186,7 @@ func (p *Player) Volume(v float64) float64 { if p._volume == nil { p.volume += v - return v + return p.volume } speaker.Lock() diff --git a/start.go b/start.go index d2b6c44..8bded6b 100644 --- a/start.go +++ b/start.go @@ -90,7 +90,6 @@ func start(application *tview.Application) { player.TogglePause() case '+': - v := int(player.volume*10) + 50 if v < 50 { vol := player.Volume(0.5)