Last active
November 7, 2025 19:35
-
-
Save Xenakios/e38cdec2af2ea654a34dbdcc9ebb2daf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline void test_choc_scandinavian() | |
| { | |
| choc::audio::WAVAudioFileFormat<true> wavformat; | |
| std::vector<std::string> filenamestotest{ | |
| R"(C:\MusicAudio\sourcesamples\test_signals\tones\😮_count_🧨.wav)", | |
| R"(C:\MusicAudio\sourcesamples\test_signals\tones\count.wav)", | |
| R"(C:\MusicAudio\sourcesamples\test_signals\tones\ÄÖÅ_count_äöå.wav)"}; | |
| std::print("testing with std::string paths directly\n"); | |
| for (auto &path : filenamestotest) | |
| { | |
| auto reader = wavformat.createReader(path); | |
| if (reader) | |
| std::print("{} [OK]\n", path); | |
| else | |
| std::print("{} [FAILED]\n", path); | |
| } | |
| std::print("testing with custom created std::ifstream instances from paths\n"); | |
| for (auto &path : filenamestotest) | |
| { | |
| std::filesystem::path infilepath{std::filesystem::u8path(path)}; | |
| std::shared_ptr<std::istream> is{new std::ifstream(infilepath, std::ios::binary)}; | |
| auto reader = wavformat.createReader(is); | |
| if (reader) | |
| std::print("{} [OK]\n", path); | |
| else | |
| std::print("{} [FAILED]\n", path); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment