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/SndfileDecoderPlugin.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 'src/decoder/plugins/SndfileDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/plugins/SndfileDecoderPlugin.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/decoder/plugins/SndfileDecoderPlugin.cxx b/src/decoder/plugins/SndfileDecoderPlugin.cxx index 886c56748..72ea77d15 100644 --- a/src/decoder/plugins/SndfileDecoderPlugin.cxx +++ b/src/decoder/plugins/SndfileDecoderPlugin.cxx @@ -23,6 +23,7 @@ #include "input/InputStream.hxx" #include "CheckAudioFormat.hxx" #include "tag/TagHandler.hxx" +#include "fs/Path.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" #include "Log.hxx" @@ -173,7 +174,7 @@ sndfile_stream_decode(Decoder &decoder, InputStream &is) } static bool -sndfile_scan_file(const char *path_fs, +sndfile_scan_file(Path path_fs, const struct tag_handler *handler, void *handler_ctx) { SNDFILE *sf; @@ -182,14 +183,14 @@ sndfile_scan_file(const char *path_fs, info.format = 0; - sf = sf_open(path_fs, SFM_READ, &info); + sf = sf_open(path_fs.c_str(), SFM_READ, &info); if (sf == nullptr) return false; if (!audio_valid_sample_rate(info.samplerate)) { sf_close(sf); FormatWarning(sndfile_domain, - "Invalid sample rate in %s", path_fs); + "Invalid sample rate in %s", path_fs.c_str()); return false; } |