diff --git a/player/player.go b/player/player.go index 5d49c29..f6b65b2 100644 --- a/player/player.go +++ b/player/player.go @@ -34,7 +34,6 @@ type Player struct { endRoutines []*reveil.Routine ntick int64 - hasClaironed bool hasSpokeWeather bool launched time.Time volume uint16 @@ -170,7 +169,7 @@ loop: for { select { case <-p.currentCmdCh: - if !p.hasClaironed && time.Since(p.launched) >= p.claironTime { + if time.Since(p.launched) >= p.claironTime { log.Println("clairon time!") p.claironTime += p.claironTime / 2 p.SetVolume(65535) @@ -178,8 +177,8 @@ loop: go p.playFile(p.claironFile) } else if p.weatherAction != nil && !p.hasSpokeWeather && time.Since(p.launched) >= p.weatherTime { log.Println("weather time!") - p.SetVolume(65535) p.dontUpdateVolume = true + p.hasSpokeWeather = true go p.launchAction(p.weatherAction) } else { p.dontUpdateVolume = false