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

◆ capture_file_from()

CaptureBuilder MayaFlux::Kriya::BufferOperation::capture_file_from ( const std::shared_ptr< IO::IOManager > &  io_manager,
const std::string &  filepath,
uint32_t  channel = 0 
)
static

Create CaptureBuilder for file with fluent configuration.

Parameters
io_managerIOManager for file loading
filepathPath to audio file
channelChannel index (default: 0)
Returns
CaptureBuilder for fluent configuration

Definition at line 63 of file BufferOperation.cpp.

67{
68 auto file_container = io_manager->load_audio(filepath);
69 if (!file_container) {
70 error<std::runtime_error>(Journal::Component::Kriya, Journal::Context::AsyncIO, std::source_location::current(),
71 "Failed to load audio file: {}", filepath);
72 }
73
74 auto file_buffer = std::make_shared<Buffers::SoundFileBridge>(channel, file_container);
75 file_buffer->setup_processors(Buffers::ProcessingToken::AUDIO_BACKEND);
76
77 return CaptureBuilder(file_buffer).on_capture_processing();
78}
@ AUDIO_BACKEND
Standard audio processing backend configuration.
@ AsyncIO
Async I/O operations ( network, streaming)
@ Kriya
Automatable tasks and fluent scheduling api for Nodes and Buffers.

References MayaFlux::Journal::AsyncIO, MayaFlux::Buffers::AUDIO_BACKEND, MayaFlux::Journal::Kriya, and MayaFlux::Kriya::CaptureBuilder::on_capture_processing().

+ Here is the call graph for this function: