10namespace fs = std::filesystem;
16 if (!fs::exists(filepath) || !fs::is_regular_file(filepath)) {
20 auto ext = filepath.extension().string();
21 std::ranges::transform(ext, ext.begin(),
22 [](
unsigned char c) { return std::tolower(c); });
24 static const std::unordered_set<std::string> image_extensions = {
25 ".png",
".jpg",
".jpeg",
".bmp",
".tga",
26 ".psd",
".gif",
".hdr",
".pic",
".pnm"
29 return image_extensions.contains(ext);
34 if (!fs::exists(filepath) || !fs::is_regular_file(filepath)) {
38 auto ext = filepath.extension().string();
39 std::ranges::transform(ext, ext.begin(),
40 [](
unsigned char c) { return std::tolower(c); });
42 static const std::unordered_set<std::string> audio_extensions = {
43 ".wav",
".aiff",
".aif",
".flac",
".ogg",
44 ".mp3",
".m4a",
".wma"
47 return audio_extensions.contains(ext);
57 "Attempted to access IOManager before engine initialization");
#define MF_ERROR(comp, ctx,...)
Core engine lifecycle and configuration API.
Audio file loading and container management API.
std::shared_ptr< IO::IOManager > get_io_manager()
Gets the IO manager.
@ Runtime
General runtime operations (default fallback)
@ API
MayaFlux/API Wrapper and convenience functions.
bool is_image(const fs::path &filepath)
bool is_engine_initialized()
Checks if the default audio engine is initialized.
bool is_audio(const fs::path &filepath)
Core::Engine & get_context()
Gets the default engine instance.
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
Main namespace for the Maya Flux audio engine.