aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/FluidsynthDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-04 11:30:26 +0200
committerMax Kellermann <max@duempel.org>2013-08-04 13:30:47 +0200
commit7a1d466fb279659048e80e2853a7906c90d73235 (patch)
treef0c73e11b86b584a1a3f230507eabcf6f02986ea /src/decoder/FluidsynthDecoderPlugin.cxx
parent83f4c48c8aaa46bbede4447c95939af310ea28ad (diff)
downloadmpd-7a1d466fb279659048e80e2853a7906c90d73235.tar.gz
mpd-7a1d466fb279659048e80e2853a7906c90d73235.tar.xz
mpd-7a1d466fb279659048e80e2853a7906c90d73235.zip
DecoderPlugin: pass config_param reference
Diffstat (limited to 'src/decoder/FluidsynthDecoderPlugin.cxx')
-rw-r--r--src/decoder/FluidsynthDecoderPlugin.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/decoder/FluidsynthDecoderPlugin.cxx b/src/decoder/FluidsynthDecoderPlugin.cxx
index e559ad45e..7d56d4f1f 100644
--- a/src/decoder/FluidsynthDecoderPlugin.cxx
+++ b/src/decoder/FluidsynthDecoderPlugin.cxx
@@ -71,20 +71,19 @@ fluidsynth_mpd_log_function(int level, char *message, G_GNUC_UNUSED void *data)
}
static bool
-fluidsynth_init(const struct config_param *param)
+fluidsynth_init(const config_param &param)
{
GError *error = nullptr;
- sample_rate = config_get_block_unsigned(param, "sample_rate", 48000);
+ sample_rate = param.GetBlockValue("sample_rate", 48000u);
if (!audio_check_sample_rate(sample_rate, &error)) {
g_warning("%s\n", error->message);
g_error_free(error);
return false;
}
- soundfont_path =
- config_get_block_string(param, "soundfont",
- "/usr/share/sounds/sf2/FluidR3_GM.sf2");
+ soundfont_path = param.GetBlockValue("soundfont",
+ "/usr/share/sounds/sf2/FluidR3_GM.sf2");
fluid_set_log_function(LAST_LOG_LEVEL,
fluidsynth_mpd_log_function, nullptr);