summaryrefslogtreecommitdiff
path: root/src/Partition.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-12-03 13:56:25 +0100
committerMax Kellermann <max@musicpd.org>2016-12-03 13:56:25 +0100
commit3472208c054507e2fd6616268570121579b5fcdb (patch)
tree30d23359906a308d8932c5769fd3e3712739aa29 /src/Partition.hxx
parentfc30e1d55966553fa2653297c15421994b1aa2bd (diff)
ReplayGainGlobal: move replay_gain_mode to struct Partition
Diffstat (limited to 'src/Partition.hxx')
-rw-r--r--src/Partition.hxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Partition.hxx b/src/Partition.hxx
index 161b6dbf5..c7fda3055 100644
--- a/src/Partition.hxx
+++ b/src/Partition.hxx
@@ -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
/**