hook up playback config onchanged

This commit is contained in:
Drew Weymouth
2023-04-01 10:42:15 -07:00
parent 4740446c13
commit d84c0d71ed
5 changed files with 57 additions and 14 deletions
+8
View File
@@ -270,6 +270,14 @@ func (p *PlaybackManager) StopAndClearPlayQueue() {
p.playQueue = nil
}
func (p *PlaybackManager) SetReplayGainOptions(config ReplayGainConfig) {
p.player.SetReplayGainOptions(player.ReplayGainOptions{
Mode: player.ReplayGainMode(config.Mode),
PreventClipping: config.PreventClipping,
PreampGain: config.PreampGainDB,
})
}
// call BEFORE updating p.nowPlayingIdx
func (p *PlaybackManager) checkScrobble(playDur time.Duration) {
if !p.scrobbleCfg.Enabled || len(p.playQueue) == 0 || p.nowPlayingIdx < 0 {