MayaFlux 0.4.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 253 of file BufferPipeline.cpp.

254{
255 try {
256 auto audio_data = std::get<std::vector<double>>(data);
257 std::span<const double> data_span(audio_data.data(), audio_data.size());
258
259 container->write_frames(data_span, 0);
260
261 } catch (const std::bad_variant_access& e) {
264 std::source_location::current(),
265 "Data type mismatch when writing to container: {}",
266 e.what());
267 } catch (const std::exception& e) {
270 std::source_location::current(),
271 "Error writing to container: {}",
272 e.what());
273 }
274}
@ 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: