command/partition: don't create null output in new partitions
No output at all is fine. If the partition needs an output, it must be moved there, but having just a null output isn't helpful.
This commit is contained in:
parent
4df98466df
commit
9cbfa66886
|
@ -105,8 +105,6 @@ handle_newpartition(Client &client, Request request, Response &response)
|
|||
AudioFormat::Undefined(),
|
||||
ReplayGainConfig());
|
||||
auto &partition = instance.partitions.back();
|
||||
partition.outputs.AddNullOutput(instance.io_thread.GetEventLoop(),
|
||||
ReplayGainConfig());
|
||||
partition.UpdateEffectiveReplayGainMode();
|
||||
|
||||
instance.EmitIdle(IDLE_PARTITION);
|
||||
|
|
|
@ -117,21 +117,6 @@ MultipleOutputs::Configure(EventLoop &event_loop,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
MultipleOutputs::AddNullOutput(EventLoop &event_loop,
|
||||
const ReplayGainConfig &replay_gain_config)
|
||||
{
|
||||
const AudioOutputDefaults defaults;
|
||||
|
||||
ConfigBlock block;
|
||||
block.AddBlockParam("type", "null");
|
||||
|
||||
outputs.emplace_back(LoadOutputControl(event_loop, replay_gain_config,
|
||||
mixer_listener,
|
||||
client, block, defaults,
|
||||
nullptr));
|
||||
}
|
||||
|
||||
AudioOutputControl *
|
||||
MultipleOutputs::FindByName(const char *name) noexcept
|
||||
{
|
||||
|
|
|
@ -78,9 +78,6 @@ public:
|
|||
const ConfigData &config,
|
||||
const ReplayGainConfig &replay_gain_config);
|
||||
|
||||
void AddNullOutput(EventLoop &event_loop,
|
||||
const ReplayGainConfig &replay_gain_config);
|
||||
|
||||
/**
|
||||
* Returns the total number of audio output devices, including
|
||||
* those which are disabled right now.
|
||||
|
|
Loading…
Reference in New Issue