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

◆ choose_audio()

MAYAFLUX_API std::shared_ptr< Kakshya::SoundFileContainer > MayaFlux::choose_audio ( )

Present a native open-file dialog filtered to audio formats and load the chosen file via IOManager::load_audio().

Blocks until the user confirms or cancels. Returns nullptr on cancellation, backend error, or if Portal::System is not initialized.

Definition at line 122 of file Depot.cpp.

123{
124 if (!require_portal("choose_audio"))
125 return nullptr;
126
127 return Portal::System::Dialog::open_file<std::shared_ptr<Kakshya::SoundFileContainer>>(
128 [](const fs::path& p) { return get_io_manager()->load_audio(p.string()); },
129 [](Core::SystemDialogError) { },
130 k_audio_open_filters);
131}
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
Definition Depot.cpp:256

References get_io_manager().

Referenced by MayaFlux::Creator::read_audio().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: