diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 03010777..54d6fd2d 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -78,11 +78,11 @@ jobs: cmake -S . -B ./build ${{ matrix.cmakeConfig }} -DCMAKE_BUILD_TYPE=Debug cmake --build ./build --config Debug --target ${{ matrix.target }} --parallel 4 - - name: Run Clap Validator - if: ${{ matrix.clapValidate }} - uses: jatinchowdhury18/clap-val-action@main - with: - plugin_path: "./build/shortcircuit-products/Shortcircuit XT.clap" + #- name: Run Clap Validator + # if: ${{ matrix.clapValidate }} + # uses: jatinchowdhury18/clap-val-action@main + # with: + # plugin_path: "./build/shortcircuit-products/Shortcircuit XT.clap" - name: Run Tests if: ${{ matrix.runTests }} diff --git a/libs/sst/libgig-modified b/libs/sst/libgig-modified index d1639be9..9ccfc876 160000 --- a/libs/sst/libgig-modified +++ b/libs/sst/libgig-modified @@ -1 +1 @@ -Subproject commit d1639be938ccfc9316fedc9a724108afcfa3c3ef +Subproject commit 9ccfc87612dd4637e142559fbd989af9b8b50cda diff --git "a/resources/test_samples/\350\201\262\351\237\263\344\270\215\345\245\275.flac" "b/resources/test_samples/\350\201\262\351\237\263\344\270\215\345\245\275.flac" new file mode 100644 index 00000000..33e40bb4 Binary files /dev/null and "b/resources/test_samples/\350\201\262\351\237\263\344\270\215\345\245\275.flac" differ diff --git "a/resources/test_samples/\350\201\262\351\237\263\344\270\215\345\245\275.mp3" "b/resources/test_samples/\350\201\262\351\237\263\344\270\215\345\245\275.mp3" new file mode 100644 index 00000000..9d368cd0 Binary files /dev/null and "b/resources/test_samples/\350\201\262\351\237\263\344\270\215\345\245\275.mp3" differ diff --git a/src/sample/loaders/load_mp3.cpp b/src/sample/loaders/load_mp3.cpp index 2f0674bf..f75ff169 100644 --- a/src/sample/loaders/load_mp3.cpp +++ b/src/sample/loaders/load_mp3.cpp @@ -37,11 +37,23 @@ bool Sample::parseMP3(const fs::path &p) { mp3dec_t mp3d; mp3dec_file_info_t info; +#if WIN32 + int count = + MultiByteToWideChar(CP_UTF8, 0, p.u8string().c_str(), p.u8string().length(), NULL, 0); + std::wstring wstr(count, 0); + MultiByteToWideChar(CP_UTF8, 0, p.u8string().c_str(), p.u8string().length(), &wstr[0], count); + if (mp3dec_load_w(&mp3d, &wstr[0], &info, nullptr, nullptr)) + { + SCLOG("Failed to parse MP3"); + return false; + } +#else if (mp3dec_load(&mp3d, p.u8string().c_str(), &info, nullptr, nullptr)) { SCLOG("Failed to parse MP3"); return false; } +#endif if (info.channels < 1 || info.channels > 2) return false; diff --git a/src/sample/sample.cpp b/src/sample/sample.cpp index a05a548b..1c10c75a 100644 --- a/src/sample/sample.cpp +++ b/src/sample/sample.cpp @@ -146,7 +146,7 @@ bool Sample::loadFromSF2(const fs::path &p, sf2::File *f, int sampleIndex) auto s = sfsample; - auto fnp = fs::path{f->GetRiffFile()->GetFileName()}; + auto fnp = fs::path(fs::u8path(f->GetRiffFile()->GetFileName())); displayName = fmt::format("{} - ({} @ {})", s->Name, fnp.filename().u8string(), sampleIndex); if (frameSize == 2 && channels == 1 && sfsample->SampleType == sf2::Sample::MONO_SAMPLE)