output/Registry: rename function
This commit is contained in:
@@ -265,7 +265,7 @@ audio_output_new(EventLoop &normal_event_loop, EventLoop &rt_event_loop,
|
|||||||
if (p == nullptr)
|
if (p == nullptr)
|
||||||
throw std::runtime_error("Missing \"type\" configuration");
|
throw std::runtime_error("Missing \"type\" configuration");
|
||||||
|
|
||||||
plugin = AudioOutputPlugin_get(p);
|
plugin = GetAudioOutputPluginByName(p);
|
||||||
if (plugin == nullptr)
|
if (plugin == nullptr)
|
||||||
throw FmtRuntimeError("No such audio output plugin: {}",
|
throw FmtRuntimeError("No such audio output plugin: {}",
|
||||||
p);
|
p);
|
||||||
|
@@ -94,7 +94,7 @@ constexpr const AudioOutputPlugin *audio_output_plugins[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const AudioOutputPlugin *
|
const AudioOutputPlugin *
|
||||||
AudioOutputPlugin_get(const char *name)
|
GetAudioOutputPluginByName(const char *name)
|
||||||
{
|
{
|
||||||
audio_output_plugins_for_each(plugin)
|
audio_output_plugins_for_each(plugin)
|
||||||
if (StringIsEqual(plugin->name, name))
|
if (StringIsEqual(plugin->name, name))
|
||||||
|
@@ -9,7 +9,7 @@ struct AudioOutputPlugin;
|
|||||||
extern const AudioOutputPlugin *const audio_output_plugins[];
|
extern const AudioOutputPlugin *const audio_output_plugins[];
|
||||||
|
|
||||||
const AudioOutputPlugin *
|
const AudioOutputPlugin *
|
||||||
AudioOutputPlugin_get(const char *name);
|
GetAudioOutputPluginByName(const char *name);
|
||||||
|
|
||||||
#define audio_output_plugins_for_each(plugin) \
|
#define audio_output_plugins_for_each(plugin) \
|
||||||
for (const AudioOutputPlugin *plugin, \
|
for (const AudioOutputPlugin *plugin, \
|
||||||
|
@@ -86,7 +86,7 @@ LoadAudioOutput(const ConfigData &config, EventLoop &event_loop,
|
|||||||
if (plugin_name == nullptr)
|
if (plugin_name == nullptr)
|
||||||
throw std::runtime_error("Missing \"type\" configuration");
|
throw std::runtime_error("Missing \"type\" configuration");
|
||||||
|
|
||||||
const auto *plugin = AudioOutputPlugin_get(plugin_name);
|
const auto *plugin = GetAudioOutputPluginByName(plugin_name);
|
||||||
if (plugin == nullptr)
|
if (plugin == nullptr)
|
||||||
throw FmtRuntimeError("No such audio output plugin: {}",
|
throw FmtRuntimeError("No such audio output plugin: {}",
|
||||||
plugin_name);
|
plugin_name);
|
||||||
|
Reference in New Issue
Block a user