diff --git a/NEWS b/NEWS index 2649ac44c..43190a367 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.19.17 (not yet released) +* replay gain: fix "replay_gain_handler mixer" setting ver 0.19.16 (2016/06/13) * faster seeking diff --git a/src/filter/plugins/ReplayGainFilterPlugin.cxx b/src/filter/plugins/ReplayGainFilterPlugin.cxx index f76e48e37..b6f574bd0 100644 --- a/src/filter/plugins/ReplayGainFilterPlugin.cxx +++ b/src/filter/plugins/ReplayGainFilterPlugin.cxx @@ -134,8 +134,6 @@ ReplayGainFilter::Update() volume = pcm_float_to_volume(scale); } - pv.SetVolume(volume); - if (mixer != nullptr) { /* update the hardware mixer volume */ @@ -146,7 +144,8 @@ ReplayGainFilter::Update() Error error; if (!mixer_set_volume(mixer, _volume, error)) LogError(error, "Failed to update hardware mixer"); - } + } else + pv.SetVolume(volume); } static Filter * @@ -174,7 +173,9 @@ ReplayGainFilter::Close() ConstBuffer ReplayGainFilter::FilterPCM(ConstBuffer src, gcc_unused Error &error) { - return pv.Apply(src); + return mixer != nullptr + ? src + : pv.Apply(src); } const struct filter_plugin replay_gain_filter_plugin = {