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/PlayerCommands.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/PlayerCommands.cxx') diff --git a/src/PlayerCommands.cxx b/src/PlayerCommands.cxx index a9cde7fd..2bd6fc4e 100644 --- a/src/PlayerCommands.cxx +++ b/src/PlayerCommands.cxx @@ -31,6 +31,7 @@ extern "C" { #include "audio_format.h" #include "volume.h" #include "replay_gain_config.h" +#include "output_all.h" } #include "PlayerControl.hxx" @@ -280,6 +281,7 @@ handle_random(Client *client, G_GNUC_UNUSED int argc, char *argv[]) return COMMAND_RETURN_ERROR; playlist_set_random(&client->playlist, client->player_control, status); + audio_output_all_set_replay_gain_mode(replay_gain_get_real_mode(client->playlist.queue.random)); return COMMAND_RETURN_OK; } @@ -386,6 +388,8 @@ handle_replay_gain_mode(Client *client, return COMMAND_RETURN_ERROR; } + audio_output_all_set_replay_gain_mode(replay_gain_get_real_mode(client->playlist.queue.random)); + return COMMAND_RETURN_OK; } -- cgit v1.2.3