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

◆ capture_file_from()

CaptureBuilder MayaFlux::Kriya::BufferOperation::capture_file_from ( const std::string &  filepath,
uint32_t  channel = 0 
)
static

Create CaptureBuilder for file with fluent configuration.

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

Definition at line 62 of file BufferOperation.cpp.

65{
66 auto file_container = MayaFlux::load_audio_file(filepath);
67 if (!file_container) {
68 error<std::runtime_error>(Journal::Component::Kriya, Journal::Context::AsyncIO, std::source_location::current(),
69 "Failed to load audio file: {}", filepath);
70 }
71
72 auto file_buffer = std::make_shared<Buffers::FileBridgeBuffer>(channel, file_container);
73 file_buffer->setup_chain_and_processor();
74
75 return CaptureBuilder(file_buffer).on_capture_processing();
76}
@ AsyncIO
Async I/O operations ( network, streaming)
@ Kriya
Automatable tasks and fluent scheduling api for Nodes and Buffers.
std::shared_ptr< MayaFlux::Kakshya::SoundFileContainer > load_audio_file(const std::string &filepath)
Loads an audio file into a SoundFileContainer with automatic format detection.
Definition Depot.cpp:18

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

+ Here is the call graph for this function: