summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-17 23:13:35 +0200
committerMax Kellermann <max@musicpd.org>2018-07-17 23:13:35 +0200
commit0c8ffa1ac32ade7cd723c40e7f542f444f9850eb (patch)
treead177ac9a25e675081c80d52455095476fa7a342 /src
parent4f678aa244156a21e37fee698bc0ad0bb41a477a (diff)
output/MultipleOutputs: use struct ConfigData
Diffstat (limited to 'src')
-rw-r--r--src/Main.cxx1
-rw-r--r--src/output/MultipleOutputs.cxx5
-rw-r--r--src/output/MultipleOutputs.hxx2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 831aa82b1..2932a0741 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -572,6 +572,7 @@ try {
for (auto &partition : instance->partitions) {
partition.outputs.Configure(instance->rtio_thread.GetEventLoop(),
+ raw_config,
config.replay_gain,
partition.pc);
partition.UpdateEffectiveReplayGainMode();
diff --git a/src/output/MultipleOutputs.cxx b/src/output/MultipleOutputs.cxx
index e9522aaef..f84441fde 100644
--- a/src/output/MultipleOutputs.cxx
+++ b/src/output/MultipleOutputs.cxx
@@ -24,7 +24,7 @@
#include "MusicPipe.hxx"
#include "MusicChunk.hxx"
#include "config/Block.hxx"
-#include "config/Global.hxx"
+#include "config/Data.hxx"
#include "config/Option.hxx"
#include "util/RuntimeError.hxx"
@@ -87,10 +87,11 @@ LoadOutputControl(EventLoop &event_loop,
void
MultipleOutputs::Configure(EventLoop &event_loop,
+ const ConfigData &config,
const ReplayGainConfig &replay_gain_config,
AudioOutputClient &client)
{
- for (const auto *param = config_get_block(ConfigBlockOption::AUDIO_OUTPUT);
+ for (const auto *param = config.GetBlock(ConfigBlockOption::AUDIO_OUTPUT);
param != nullptr; param = param->next) {
param->SetUsed();
auto *output = LoadOutputControl(event_loop,
diff --git a/src/output/MultipleOutputs.hxx b/src/output/MultipleOutputs.hxx
index a01c78cfe..7e9e201f4 100644
--- a/src/output/MultipleOutputs.hxx
+++ b/src/output/MultipleOutputs.hxx
@@ -42,6 +42,7 @@ class MusicPipe;
class EventLoop;
class MixerListener;
class AudioOutputClient;
+struct ConfigData;
struct ReplayGainConfig;
class MultipleOutputs final : public PlayerOutputs {
@@ -72,6 +73,7 @@ public:
~MultipleOutputs() noexcept;
void Configure(EventLoop &event_loop,
+ const ConfigData &config,
const ReplayGainConfig &replay_gain_config,
AudioOutputClient &client);