aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlayerCommands.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/PlayerCommands.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/PlayerCommands.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/PlayerCommands.cxx b/src/PlayerCommands.cxx
index a9cde7fd5..2bd6fc4e6 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;
}