MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ is_audio() [1/2]

bool MayaFlux::is_audio ( const fs::path &  filepath)

Definition at line 61 of file Depot.cpp.

62{
63 if (!fs::exists(filepath) || !fs::is_regular_file(filepath)) {
64 return false;
65 }
66
67 auto ext = filepath.extension().string();
68 std::ranges::transform(ext, ext.begin(),
69 [](unsigned char c) { return std::tolower(c); });
70
71 static const std::unordered_set<std::string> audio_extensions = {
72 ".wav", ".aiff", ".aif", ".flac", ".ogg",
73 ".mp3", ".m4a", ".wma"
74 };
75
76 return audio_extensions.contains(ext);
77}