output/MultipleOutputs: add method HasName()
This commit is contained in:
parent
f2c3d86612
commit
f616bfe354
|
@ -98,7 +98,7 @@ MultipleOutputs::Configure(EventLoop &event_loop,
|
|||
mixer_listener,
|
||||
client, block, defaults,
|
||||
&filter_factory);
|
||||
if (FindByName(output->GetName()) != nullptr)
|
||||
if (HasName(output->GetName()))
|
||||
throw FormatRuntimeError("output devices with identical "
|
||||
"names: %s", output->GetName());
|
||||
|
||||
|
|
|
@ -113,6 +113,14 @@ public:
|
|||
gcc_pure
|
||||
AudioOutputControl *FindByName(const char *name) noexcept;
|
||||
|
||||
/**
|
||||
* Does an audio output device with this name exist?
|
||||
*/
|
||||
gcc_pure
|
||||
bool HasName(const char *name) noexcept {
|
||||
return FindByName(name) != nullptr;
|
||||
}
|
||||
|
||||
void SetReplayGainMode(ReplayGainMode mode) noexcept;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue