output/MultipleOutputs: add method AddNullOutput()

This commit is contained in:
Max Kellermann 2017-02-17 23:53:44 +01:00
parent 77178e0590
commit 1e972174a6
2 changed files with 18 additions and 0 deletions

View File

@ -93,6 +93,20 @@ MultipleOutputs::Configure(EventLoop &event_loop,
}
}
void
MultipleOutputs::AddNullOutput(EventLoop &event_loop,
const ReplayGainConfig &replay_gain_config,
AudioOutputClient &client)
{
ConfigBlock block;
block.AddBlockParam("type", "null");
auto output = LoadOutput(event_loop, replay_gain_config,
mixer_listener,
client, block);
outputs.push_back(output);
}
AudioOutput *
MultipleOutputs::FindByName(const char *name) const
{

View File

@ -80,6 +80,10 @@ public:
const ReplayGainConfig &replay_gain_config,
AudioOutputClient &client);
void AddNullOutput(EventLoop &event_loop,
const ReplayGainConfig &replay_gain_config,
AudioOutputClient &client);
/**
* Returns the total number of audio output devices, including
* those which are disabled right now.