Partition: add UpdateEffectiveReplayGainMode()

Move code from replay_gain_get_real_mode().
This commit is contained in:
Max Kellermann
2016-11-24 15:18:57 +01:00
parent 9b9144f25d
commit 0759d72108
6 changed files with 22 additions and 23 deletions

View File

@@ -263,7 +263,7 @@ handle_random(Client &client, Request args, gcc_unused Response &r)
{
bool status = args.ParseBool(0);
client.partition.SetRandom(status);
client.partition.outputs.SetReplayGainMode(replay_gain_get_real_mode(client.partition.GetRandom()));
client.partition.UpdateEffectiveReplayGainMode(replay_gain_mode);
return CommandResult::OK;
}
@@ -338,7 +338,7 @@ handle_replay_gain_mode(Client &client, Request args, Response &r)
return CommandResult::ERROR;
}
client.partition.outputs.SetReplayGainMode(replay_gain_get_real_mode(client.playlist.queue.random));
client.partition.UpdateEffectiveReplayGainMode(replay_gain_mode);
client.partition.EmitIdle(IDLE_OPTIONS);
return CommandResult::OK;
}