From 1a8ef3cdab39234e91fe9d91dad2ae004e4537dc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 5 Jan 2013 00:05:57 +0100 Subject: filter/ReplayGain: add method _set_mode() Push the new mode to the filter instead of accessing global variables through replay_gain_get_real_mode(). --- src/OutputControl.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/OutputControl.cxx') 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" @@ -95,6 +96,14 @@ ao_lock_command(struct audio_output *ao, enum audio_output_command cmd) g_mutex_unlock(ao->mutex); } +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) { -- cgit v1.2.3