aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputControl.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-05 00:05:57 +0100
committerMax Kellermann <max@duempel.org>2013-01-05 02:40:33 +0100
commit1a8ef3cdab39234e91fe9d91dad2ae004e4537dc (patch)
tree128f25b72f61ff2e7a2a3fb1f292b57ad27b9061 /src/OutputControl.cxx
parent7be33eba489825d3a36f3ccbb3571002fcc06c0b (diff)
downloadmpd-1a8ef3cdab39234e91fe9d91dad2ae004e4537dc.tar.gz
mpd-1a8ef3cdab39234e91fe9d91dad2ae004e4537dc.tar.xz
mpd-1a8ef3cdab39234e91fe9d91dad2ae004e4537dc.zip
filter/ReplayGain: add method _set_mode()
Push the new mode to the filter instead of accessing global variables through replay_gain_get_real_mode().
Diffstat (limited to '')
-rw-r--r--src/OutputControl.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/OutputControl.cxx b/src/OutputControl.cxx
index 36e80a014..7cc2814de 100644
--- a/src/OutputControl.cxx
+++ b/src/OutputControl.cxx
@@ -27,6 +27,7 @@ extern "C" {
#include "mixer_control.h"
#include "mixer_plugin.h"
#include "notify.h"
+#include "filter/replay_gain_filter_plugin.h"
}
#include "filter_plugin.h"
@@ -96,6 +97,14 @@ ao_lock_command(struct audio_output *ao, enum audio_output_command cmd)
}
void
+audio_output_set_replay_gain_mode(struct audio_output *ao,
+ enum replay_gain_mode mode)
+{
+ if (ao->replay_gain_filter != NULL)
+ replay_gain_filter_set_mode(ao->replay_gain_filter, mode);
+}
+
+void
audio_output_enable(struct audio_output *ao)
{
if (ao->thread == NULL) {