diff options
author | Max Kellermann <max@duempel.org> | 2014-02-07 18:52:19 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-07 18:52:19 +0100 |
commit | 6b421cc354cb0c297fcf99d7824b99b61caec99d (patch) | |
tree | e41f9fd76e3850da2716ab3dfd4fa08025f351f3 /src/decoder/plugins/WildmidiDecoderPlugin.cxx | |
parent | 37ec29b225095e9c02b974134e056f8ba1a8678c (diff) | |
download | mpd-6b421cc354cb0c297fcf99d7824b99b61caec99d.tar.gz mpd-6b421cc354cb0c297fcf99d7824b99b61caec99d.tar.xz mpd-6b421cc354cb0c297fcf99d7824b99b61caec99d.zip |
DecoderPlugin: pass Path instance to file_decode() and scan_file()
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/WildmidiDecoderPlugin.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/decoder/plugins/WildmidiDecoderPlugin.cxx b/src/decoder/plugins/WildmidiDecoderPlugin.cxx index 9a6018022..a3a4b2745 100644 --- a/src/decoder/plugins/WildmidiDecoderPlugin.cxx +++ b/src/decoder/plugins/WildmidiDecoderPlugin.cxx @@ -25,6 +25,7 @@ #include "util/Domain.hxx" #include "fs/AllocatedPath.hxx" #include "fs/FileSystem.hxx" +#include "fs/Path.hxx" #include "system/FatalError.hxx" #include "Log.hxx" @@ -65,7 +66,7 @@ wildmidi_finish(void) } static void -wildmidi_file_decode(Decoder &decoder, const char *path_fs) +wildmidi_file_decode(Decoder &decoder, Path path_fs) { static constexpr AudioFormat audio_format = { WILDMIDI_SAMPLE_RATE, @@ -75,7 +76,7 @@ wildmidi_file_decode(Decoder &decoder, const char *path_fs) midi *wm; const struct _WM_Info *info; - wm = WildMidi_Open(path_fs); + wm = WildMidi_Open(path_fs.c_str()); if (wm == nullptr) return; @@ -118,10 +119,10 @@ wildmidi_file_decode(Decoder &decoder, const char *path_fs) } static bool -wildmidi_scan_file(const char *path_fs, +wildmidi_scan_file(Path path_fs, const struct tag_handler *handler, void *handler_ctx) { - midi *wm = WildMidi_Open(path_fs); + midi *wm = WildMidi_Open(path_fs.c_str()); if (wm == nullptr) return false; |