wavpack: fix compilation on Windows

NarrowPath is needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-01-03 13:32:50 -08:00
parent fb9194b537
commit 914ee92015
1 changed files with 4 additions and 2 deletions

View File

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