ReplayGainGlobal: move replay_gain_mode to struct Partition

This commit is contained in:
Max Kellermann
2016-12-03 13:56:25 +01:00
parent fc30e1d559
commit 3472208c05
6 changed files with 30 additions and 27 deletions

View File

@@ -27,6 +27,7 @@
#include "mixer/Listener.hxx"
#include "player/Control.hxx"
#include "player/Listener.hxx"
#include "ReplayGainMode.hxx"
#include "Chrono.hxx"
#include "Compiler.h"
@@ -52,6 +53,8 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
PlayerControl pc;
ReplayGainMode replay_gain_mode = ReplayGainMode::OFF;
Partition(Instance &_instance,
unsigned max_length,
unsigned buffer_chunks,
@@ -177,13 +180,16 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
playlist.SetConsume(new_value);
}
void SetReplayGainMode(ReplayGainMode mode) {
replay_gain_mode = mode;
UpdateEffectiveReplayGainMode();
}
/**
* Publishes the effective #ReplayGainMode to all subsystems.
* #ReplayGainMode::AUTO is substituted.
*
* @param mode the configured mode
*/
void UpdateEffectiveReplayGainMode(ReplayGainMode mode);
void UpdateEffectiveReplayGainMode();
#ifdef ENABLE_DATABASE
/**