DecoderPlugin: pass Path instance to file_decode() and scan_file()

This commit is contained in:
Max Kellermann
2014-02-07 18:52:19 +01:00
parent 37ec29b225
commit 6b421cc354
17 changed files with 103 additions and 82 deletions

View File

@@ -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;