MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kriya::CycleCoordinator Class Reference

Cross-pipeline synchronization and coordination system. More...

#include <CycleCoordinator.hpp>

+ Collaboration diagram for MayaFlux::Kriya::CycleCoordinator:

Public Member Functions

 CycleCoordinator (Vruta::TaskScheduler &scheduler)
 Construct coordinator with task scheduler integration.
 
Vruta::SoundRoutine sync_pipelines (std::vector< std::reference_wrapper< BufferPipeline > > pipelines, uint32_t sync_every_n_cycles=1, uint64_t samples_per_cycle=1)
 Create a synchronization routine for multiple pipelines.
 
std::shared_ptr< Vruta::SoundRoutinesync_pipelines_at_rate (std::vector< std::reference_wrapper< BufferPipeline > > pipelines, uint32_t sync_every_n_cycles, double seconds_per_cycle)
 Create a synchronization routine based on real-time rate.
 
Vruta::SoundRoutine manage_transient_data (std::shared_ptr< Buffers::AudioBuffer > buffer, std::function< void(uint32_t)> on_data_ready, std::function< void(uint32_t)> on_data_expired)
 Create a transient data management routine.
 

Private Attributes

Vruta::TaskSchedulerm_scheduler
 

Detailed Description

Cross-pipeline synchronization and coordination system.

CycleCoordinator provides synchronization mechanisms for coordinating multiple BufferPipeline instances and managing transient data lifecycles. It integrates with the Vruta scheduling system to provide sample-accurate timing coordination across complex processing networks.

Example Usage:

CycleCoordinator coordinator(*scheduler);
// Synchronize multiple analysis pipelines
auto sync_routine = coordinator.sync_pipelines({
std::ref(spectral_pipeline),
std::ref(temporal_pipeline),
std::ref(feature_pipeline)
}, 4); // Sync every 4 cycles
// Manage transient capture data
auto data_routine = coordinator.manage_transient_data(
capture_buffer,
[](uint32_t cycle) { std::cout << "Data ready: " << cycle << std::endl; },
[](uint32_t cycle) { cleanup_expired_data(cycle); }
);
scheduler->add_task(sync_routine);
scheduler->add_task(data_routine);
Cross-pipeline synchronization and coordination system.
See also
BufferPipeline For pipeline construction
BufferCapture For data capture strategies
Vruta::TaskScheduler For execution scheduling

Definition at line 45 of file CycleCoordinator.hpp.


The documentation for this class was generated from the following files: