MayaFlux 0.1.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 162 of file Depot.cpp.

163{
164 if (!fs::exists(filepath) || !fs::is_regular_file(filepath)) {
165 return false;
166 }
167
168 auto ext = filepath.extension().string();
169 std::ranges::transform(ext, ext.begin(),
170 [](unsigned char c) { return std::tolower(c); });
171
172 static const std::unordered_set<std::string> audio_extensions = {
173 ".wav", ".aiff", ".aif", ".flac", ".ogg",
174 ".mp3", ".m4a", ".wma"
175 };
176
177 return audio_extensions.contains(ext);
178}