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:
Max Kellermann 2020-01-20 14:54:21 +01:00
parent 4df98466df
commit 9cbfa66886
3 changed files with 0 additions and 20 deletions

View File

@ -105,8 +105,6 @@ handle_newpartition(Client &client, Request request, Response &response)
AudioFormat::Undefined(), AudioFormat::Undefined(),
ReplayGainConfig()); ReplayGainConfig());
auto &partition = instance.partitions.back(); auto &partition = instance.partitions.back();
partition.outputs.AddNullOutput(instance.io_thread.GetEventLoop(),
ReplayGainConfig());
partition.UpdateEffectiveReplayGainMode(); partition.UpdateEffectiveReplayGainMode();
instance.EmitIdle(IDLE_PARTITION); instance.EmitIdle(IDLE_PARTITION);

View File

@ -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 * AudioOutputControl *
MultipleOutputs::FindByName(const char *name) noexcept MultipleOutputs::FindByName(const char *name) noexcept
{ {

View File

@ -78,9 +78,6 @@ public:
const ConfigData &config, const ConfigData &config,
const ReplayGainConfig &replay_gain_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 * Returns the total number of audio output devices, including
* those which are disabled right now. * those which are disabled right now.