diff options
author | Max Kellermann <max@duempel.org> | 2013-08-04 12:25:08 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-08-04 14:07:49 +0200 |
commit | 81c3224076da6ad727debc6bab8a5422f7322451 (patch) | |
tree | 1da1912caa6c7ff863f7affeafae22e9e6004e8f /src/output/AoOutputPlugin.cxx | |
parent | 7a1d466fb279659048e80e2853a7906c90d73235 (diff) | |
download | mpd-81c3224076da6ad727debc6bab8a5422f7322451.tar.gz mpd-81c3224076da6ad727debc6bab8a5422f7322451.tar.xz mpd-81c3224076da6ad727debc6bab8a5422f7322451.zip |
OutputPlugin: pass config_param reference
Diffstat (limited to 'src/output/AoOutputPlugin.cxx')
-rw-r--r-- | src/output/AoOutputPlugin.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/output/AoOutputPlugin.cxx b/src/output/AoOutputPlugin.cxx index d25a30973..db7b9a360 100644 --- a/src/output/AoOutputPlugin.cxx +++ b/src/output/AoOutputPlugin.cxx @@ -42,7 +42,7 @@ struct AoOutput { ao_option *options; ao_device *device; - bool Initialize(const config_param *param, GError **error_r) { + bool Initialize(const config_param ¶m, GError **error_r) { return ao_base_init(&base, &ao_output_plugin, param, error_r); } @@ -51,7 +51,7 @@ struct AoOutput { ao_base_finish(&base); } - bool Configure(const config_param *param, GError **error_r); + bool Configure(const config_param ¶m, GError **error_r); }; static inline GQuark @@ -95,20 +95,20 @@ ao_output_error(GError **error_r) } inline bool -AoOutput::Configure(const config_param *param, GError **error_r) +AoOutput::Configure(const config_param ¶m, GError **error_r) { const char *value; options = nullptr; - write_size = config_get_block_unsigned(param, "write_size", 1024); + write_size = param.GetBlockValue("write_size", 1024u); if (ao_output_ref == 0) { ao_initialize(); } ao_output_ref++; - value = config_get_block_string(param, "driver", "default"); + value = param.GetBlockValue("driver", "default"); if (0 == strcmp(value, "default")) driver = ao_default_driver_id(); else @@ -129,9 +129,9 @@ AoOutput::Configure(const config_param *param, GError **error_r) } g_debug("using ao driver \"%s\" for \"%s\"\n", ai->short_name, - config_get_block_string(param, "name", nullptr)); + param.GetBlockValue("name", nullptr)); - value = config_get_block_string(param, "options", nullptr); + value = param.GetBlockValue("options", nullptr); if (value != nullptr) { gchar **_options = g_strsplit(value, ";", 0); @@ -158,7 +158,7 @@ AoOutput::Configure(const config_param *param, GError **error_r) } static struct audio_output * -ao_output_init(const config_param *param, GError **error_r) +ao_output_init(const config_param ¶m, GError **error_r) { AoOutput *ad = new AoOutput(); |