config: allow configuring partitions

This just allows creating empty partitions.  More features to come.
This commit is contained in:
Max Kellermann
2022-07-12 20:50:46 +02:00
parent 64f84d5468
commit 199037c682
5 changed files with 44 additions and 0 deletions

View File

@@ -410,6 +410,15 @@ MainConfigured(const CommandLineOptions &options,
partition.UpdateEffectiveReplayGainMode();
}
raw_config.WithEach(ConfigBlockOption::PARTITION, [&](const auto &block){
const char *name = block.GetBlockValue("name");
if (name == nullptr)
throw std::runtime_error("Missing 'name'");
instance.partitions.emplace_back(instance, name,
partition_config);
});
client_manager_init(raw_config);
const ScopeInputPluginsInit input_plugins_init(raw_config,
instance.io_thread.GetEventLoop());