aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/OssOutputPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-04 12:25:08 +0200
committerMax Kellermann <max@duempel.org>2013-08-04 14:07:49 +0200
commit81c3224076da6ad727debc6bab8a5422f7322451 (patch)
tree1da1912caa6c7ff863f7affeafae22e9e6004e8f /src/output/OssOutputPlugin.cxx
parent7a1d466fb279659048e80e2853a7906c90d73235 (diff)
downloadmpd-81c3224076da6ad727debc6bab8a5422f7322451.tar.gz
mpd-81c3224076da6ad727debc6bab8a5422f7322451.tar.xz
mpd-81c3224076da6ad727debc6bab8a5422f7322451.zip
OutputPlugin: pass config_param reference
Diffstat (limited to 'src/output/OssOutputPlugin.cxx')
-rw-r--r--src/output/OssOutputPlugin.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/output/OssOutputPlugin.cxx b/src/output/OssOutputPlugin.cxx
index 49b02386b..2ef0edd67 100644
--- a/src/output/OssOutputPlugin.cxx
+++ b/src/output/OssOutputPlugin.cxx
@@ -80,7 +80,7 @@ struct OssOutput {
OssOutput():fd(-1), device(nullptr) {}
- bool Initialize(const config_param *param, GError **error_r) {
+ bool Initialize(const config_param &param, GError **error_r) {
return ao_base_init(&base, &oss_output_plugin, param,
error_r);
}
@@ -160,11 +160,12 @@ oss_open_default(GError **error)
int err[G_N_ELEMENTS(default_devices)];
enum oss_stat ret[G_N_ELEMENTS(default_devices)];
+ const config_param empty;
for (int i = G_N_ELEMENTS(default_devices); --i >= 0; ) {
ret[i] = oss_stat_device(default_devices[i], &err[i]);
if (ret[i] == OSS_STAT_NO_ERROR) {
OssOutput *od = new OssOutput();
- if (!od->Initialize(nullptr, error)) {
+ if (!od->Initialize(empty, error)) {
delete od;
return NULL;
}
@@ -201,9 +202,9 @@ oss_open_default(GError **error)
}
static struct audio_output *
-oss_output_init(const config_param *param, GError **error_r)
+oss_output_init(const config_param &param, GError **error_r)
{
- const char *device = config_get_block_string(param, "device", NULL);
+ const char *device = param.GetBlockValue("device");
if (device != NULL) {
OssOutput *od = new OssOutput();
if (!od->Initialize(param, error_r)) {