MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / sorted_wav_files

Function sorted_wav_files

src/framework/audio/utility_api.cpp:36–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36std::vector<std::filesystem::path> sorted_wav_files(const std::filesystem::path & input_dir) {
37 if (!std::filesystem::is_directory(input_dir)) {
38 throw std::runtime_error("audio utility input directory is missing: " + input_dir.string());
39 }
40 std::vector<std::filesystem::path> files;
41 for (const auto & entry : std::filesystem::directory_iterator(input_dir)) {
42 if (entry.is_regular_file() && is_wav_file(entry.path())) {
43 files.push_back(entry.path());
44 }
45 }
46 std::sort(files.begin(), files.end());
47 if (files.empty()) {
48 throw std::runtime_error("audio utility input directory contains no WAV files: " + input_dir.string());
49 }
50 return files;
51}
52
53std::filesystem::path output_path_for(
54 const std::filesystem::path & input_file,

Callers 2

denoise_directoryFunction · 0.85
super_resolve_directoryFunction · 0.85

Calls 4

is_wav_fileFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected