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

◆ sync_pipelines_at_rate()

std::shared_ptr< Vruta::SoundRoutine > MayaFlux::Kriya::CycleCoordinator::sync_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.

Parameters
pipelinesVector of pipeline references to synchronize
sync_every_n_cyclesSynchronization interval in cycles
seconds_per_cycleDuration of each cycle in seconds
Returns
SoundRoutine that manages pipeline synchronization

Definition at line 46 of file CycleCoordinator.cpp.

50{
51 uint64_t samples_per_cycle = m_scheduler.seconds_to_samples(seconds_per_cycle);
52 auto routine = sync_pipelines(pipelines, sync_every_n_cycles, samples_per_cycle);
53 return std::make_shared<Vruta::SoundRoutine>(std::move(routine));
54}
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.
uint64_t seconds_to_samples(double seconds) const
Converts a time in seconds to a number of samples.

References m_scheduler, MayaFlux::Vruta::TaskScheduler::seconds_to_samples(), and sync_pipelines().

+ Here is the call graph for this function: