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

◆ create_samplers() [2/2]

MAYAFLUX_API std::vector< std::shared_ptr< Kriya::SamplingPipeline > > MayaFlux::create_samplers ( uint32_t  num_samples = 48000 *5,
bool  truncate = true,
uint64_t  max_dur_ms = 0,
uint32_t  max_channels = 0 
)

Construct one built SamplingPipeline per channel from a file picked in a dialog.

Same as the path form, with the file chosen in a native open-file dialog.

Returns
One pipeline per channel. Empty if nothing was chosen or loaded.

Definition at line 121 of file Rigs.cpp.

123{
124 auto stream = choose_audio_bounded(num_samples, truncate);
125
126 if (!stream) {
127 MF_ERROR(Journal::Component::API, Journal::Context::FileIO,
128 "create_samplers: no file chosen");
129 return {};
130 }
131
132 return samplers_from_stream(stream, max_dur_ms, max_channels);
133}
#define MF_ERROR(comp, ctx,...)
Core::GlobalStreamInfo stream
Definition Config.cpp:40
std::shared_ptr< Kakshya::DynamicSoundStream > choose_audio_bounded(uint64_t max_frames, bool truncate)
Present a native open-file dialog filtered to audio formats and load the chosen file via IOManager::l...
Definition Depot.cpp:204

References MayaFlux::Journal::API, choose_audio_bounded(), MayaFlux::Journal::FileIO, MF_ERROR, and stream.

+ Here is the call graph for this function: