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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user