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.