Added CU8 playback support (#3166)

This commit is contained in:
Totoo
2026-05-09 12:23:43 +02:00
committed by GitHub
parent 900d2f2482
commit f38ef4ebc8
6 changed files with 35 additions and 2 deletions
+4 -1
View File
@@ -30,6 +30,7 @@
namespace fs = std::filesystem;
static const fs::path c8_ext{u".C8"};
static const fs::path cu8_ext{u".CU8"};
static const fs::path c16_ext{u".C16"};
Optional<File::Error> File::open_fatfs(const std::filesystem::path& filename, BYTE mode) {
@@ -543,12 +544,14 @@ bool path_iequal(
bool is_cxx_capture_file(const path& filename) {
auto ext = filename.extension();
return path_iequal(c8_ext, ext) || path_iequal(c16_ext, ext);
return path_iequal(c8_ext, ext) || path_iequal(cu8_ext, ext) || path_iequal(c16_ext, ext);
}
uint8_t capture_file_sample_size(const path& filename) {
if (path_iequal(filename.extension(), c8_ext))
return sizeof(complex8_t);
if (path_iequal(filename.extension(), cu8_ext))
return sizeof(complexu8_t);
if (path_iequal(filename.extension(), c16_ext))
return sizeof(complex16_t);
return 0;