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

◆ write_to_container()

void MayaFlux::Kriya::BufferPipeline::write_to_container ( const std::shared_ptr< Kakshya::DynamicSoundStream > &  container,
const Kakshya::DataVariant data 
)
staticprivate

Definition at line 240 of file BufferPipeline.cpp.

241{
242 try {
243 auto audio_data = std::get<std::vector<double>>(data);
244 std::span<const double> data_span(audio_data.data(), audio_data.size());
245
246 container->write_frames(data_span, 0);
247
248 } catch (const std::bad_variant_access& e) {
251 std::source_location::current(),
252 "Data type mismatch when writing to container: {}",
253 e.what());
254 } catch (const std::exception& e) {
257 std::source_location::current(),
258 "Error writing to container: {}",
259 e.what());
260 }
261}
@ CoroutineScheduling
Coroutine scheduling and temporal coordination (Vruta::TaskScheduler)
void error_rethrow(Component component, Context context, std::source_location location=std::source_location::current(), std::string_view additional_context="")
Catch and log an exception, then rethrow it.
@ Kriya
Automatable tasks and fluent scheduling api for Nodes and Buffers.

References MayaFlux::Journal::CoroutineScheduling, and MayaFlux::Journal::Kriya.

Referenced by capture_operation(), and process_operation().

+ Here is the caller graph for this function: