filter/ReplayGain: add method _set_mode()

Push the new mode to the filter instead of accessing global variables
through replay_gain_get_real_mode().
This commit is contained in:
Max Kellermann
2013-01-05 00:05:57 +01:00
parent 7be33eba48
commit 1a8ef3cdab
12 changed files with 56 additions and 20 deletions

View File

@@ -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)
{