Minor changes in relation with FLAC
This commit is contained in:
parent
17fbff5ab5
commit
393aef5311
1 changed files with 2 additions and 2 deletions
|
|
@ -98,7 +98,7 @@ bool FileInstruments::extractFromFlac(const fs::path& path, SF_INSTRUMENT& ins)
|
||||||
memset(&ins, 0, sizeof(SF_INSTRUMENT));
|
memset(&ins, 0, sizeof(SF_INSTRUMENT));
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
FILE_u stream(fopen(path.native().c_str(), "rb"));
|
FILE_u stream(fopen(path.c_str(), "rb"));
|
||||||
#else
|
#else
|
||||||
FILE_u stream(_wfopen(path.wstring().c_str(), L"rb"));
|
FILE_u stream(_wfopen(path.wstring().c_str(), L"rb"));
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -129,7 +129,7 @@ bool FileInstruments::extractFromFlac(const fs::path& path, SF_INSTRUMENT& ins)
|
||||||
std::unique_ptr<uint8_t[]> chunk { new uint8_t[riffChunkSize] };
|
std::unique_ptr<uint8_t[]> chunk { new uint8_t[riffChunkSize] };
|
||||||
if (fread(chunk.get(), riffChunkSize, 1, stream.get()) == 1)
|
if (fread(chunk.get(), riffChunkSize, 1, stream.get()) == 1)
|
||||||
return extractSamplerChunkInstrument(
|
return extractSamplerChunkInstrument(
|
||||||
absl::MakeConstSpan(chunk.get(), riffChunkSize), ins);
|
{ chunk.get(), riffChunkSize }, ins);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue