aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/WavpackDecoderPlugin.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/WavpackDecoderPlugin.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 '')
-rw-r--r--src/decoder/plugins/WavpackDecoderPlugin.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/decoder/plugins/WavpackDecoderPlugin.cxx b/src/decoder/plugins/WavpackDecoderPlugin.cxx
index e65d374d2..27bede56c 100644
--- a/src/decoder/plugins/WavpackDecoderPlugin.cxx
+++ b/src/decoder/plugins/WavpackDecoderPlugin.cxx
@@ -24,6 +24,7 @@
#include "CheckAudioFormat.hxx"
#include "tag/TagHandler.hxx"
#include "tag/ApeTag.hxx"
+#include "fs/Path.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "util/Macros.hxx"
@@ -269,15 +270,16 @@ wavpack_scan_pair(WavpackContext *wpc, const char *name,
* Reads metainfo from the specified file.
*/
static bool
-wavpack_scan_file(const char *fname,
+wavpack_scan_file(Path path_fs,
const struct tag_handler *handler, void *handler_ctx)
{
char error[ERRORLEN];
- WavpackContext *wpc = WavpackOpenFileInput(fname, error, OPEN_TAGS, 0);
+ WavpackContext *wpc = WavpackOpenFileInput(path_fs.c_str(), error,
+ OPEN_TAGS, 0);
if (wpc == nullptr) {
FormatError(wavpack_domain,
"failed to open WavPack file \"%s\": %s",
- fname, error);
+ path_fs.c_str(), error);
return false;
}
@@ -525,16 +527,16 @@ wavpack_streamdecode(Decoder &decoder, InputStream &is)
* Decodes a file.
*/
static void
-wavpack_filedecode(Decoder &decoder, const char *fname)
+wavpack_filedecode(Decoder &decoder, Path path_fs)
{
char error[ERRORLEN];
- WavpackContext *wpc = WavpackOpenFileInput(fname, error,
+ WavpackContext *wpc = WavpackOpenFileInput(path_fs.c_str(), error,
OPEN_TAGS | OPEN_WVC | OPEN_NORMALIZE,
23);
if (wpc == nullptr) {
FormatWarning(wavpack_domain,
"failed to open WavPack file \"%s\": %s",
- fname, error);
+ path_fs.c_str(), error);
return;
}