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
+4
View File
@@ -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;
}