From 914ee9201596aafc4a76f5456b4eccd01c419726 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 3 Jan 2024 13:32:50 -0800 Subject: [PATCH] wavpack: fix compilation on Windows NarrowPath is needed. Signed-off-by: Rosen Penev --- src/decoder/plugins/WavpackDecoderPlugin.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/decoder/plugins/WavpackDecoderPlugin.cxx b/src/decoder/plugins/WavpackDecoderPlugin.cxx index 476a0e508..707333a8a 100644 --- a/src/decoder/plugins/WavpackDecoderPlugin.cxx +++ b/src/decoder/plugins/WavpackDecoderPlugin.cxx @@ -7,6 +7,7 @@ #include "input/InputStream.hxx" #include "pcm/CheckAudioFormat.hxx" #include "tag/Handler.hxx" +#include "fs/NarrowPath.hxx" #include "fs/Path.hxx" #include "lib/fmt/PathFormatter.hxx" #include "lib/fmt/RuntimeError.hxx" @@ -36,8 +37,9 @@ static WavpackContext * WavpackOpenInput(Path path, int flags, int norm_offset) { char error[ERRORLEN]; - auto *wpc = WavpackOpenFileInput(path.c_str(), error, - flags, norm_offset); + auto np = NarrowPath(path); + auto wpc = WavpackOpenFileInput(np, error, + flags, norm_offset); if (wpc == nullptr) throw FmtRuntimeError("failed to open WavPack file \"{}\": {}", path, error);