aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/FluidsynthDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-07 18:52:19 +0100
committerMax Kellermann <max@duempel.org>2014-02-07 18:52:19 +0100
commit6b421cc354cb0c297fcf99d7824b99b61caec99d (patch)
treee41f9fd76e3850da2716ab3dfd4fa08025f351f3 /src/decoder/plugins/FluidsynthDecoderPlugin.cxx
parent37ec29b225095e9c02b974134e056f8ba1a8678c (diff)
downloadmpd-6b421cc354cb0c297fcf99d7824b99b61caec99d.tar.gz
mpd-6b421cc354cb0c297fcf99d7824b99b61caec99d.tar.xz
mpd-6b421cc354cb0c297fcf99d7824b99b61caec99d.zip
DecoderPlugin: pass Path instance to file_decode() and scan_file()
Diffstat (limited to 'src/decoder/plugins/FluidsynthDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/FluidsynthDecoderPlugin.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/decoder/plugins/FluidsynthDecoderPlugin.cxx b/src/decoder/plugins/FluidsynthDecoderPlugin.cxx
index 3b4703e97..bdf30baea 100644
--- a/src/decoder/plugins/FluidsynthDecoderPlugin.cxx
+++ b/src/decoder/plugins/FluidsynthDecoderPlugin.cxx
@@ -21,6 +21,7 @@
#include "FluidsynthDecoderPlugin.hxx"
#include "../DecoderAPI.hxx"
#include "CheckAudioFormat.hxx"
+#include "fs/Path.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "util/Macros.hxx"
@@ -92,7 +93,7 @@ fluidsynth_init(const config_param &param)
}
static void
-fluidsynth_file_decode(Decoder &decoder, const char *path_fs)
+fluidsynth_file_decode(Decoder &decoder, Path path_fs)
{
char setting_sample_rate[] = "synth.sample-rate";
/*
@@ -141,7 +142,7 @@ fluidsynth_file_decode(Decoder &decoder, const char *path_fs)
return;
}
- ret = fluid_player_add(player, path_fs);
+ ret = fluid_player_add(player, path_fs.c_str());
if (ret != 0) {
LogWarning(fluidsynth_domain, "fluid_player_add() failed");
delete_fluid_player(player);
@@ -198,11 +199,11 @@ fluidsynth_file_decode(Decoder &decoder, const char *path_fs)
}
static bool
-fluidsynth_scan_file(const char *file,
+fluidsynth_scan_file(Path path_fs,
gcc_unused const struct tag_handler *handler,
gcc_unused void *handler_ctx)
{
- return fluid_is_midifile(file);
+ return fluid_is_midifile(path_fs.c_str());
}
static const char *const fluidsynth_suffixes[] = {