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

◆ TaskScheduler()

MayaFlux::Vruta::TaskScheduler::TaskScheduler ( uint32_t  default_sample_rate = 48000,
uint32_t  default_frame_rate = 60 
)

Constructs a TaskScheduler with the specified sample rate.

Parameters
sample_rateThe number of samples per second (default: 48000)

Creates a new TaskScheduler with an internal SampleClock initialized to the given sample rate. The sample rate determines the relationship between sample counts and real-time durations for all scheduled tasks.

Definition at line 7 of file Scheduler.cpp.

8 : m_clock(default_sample_rate)
10{
13 ensure_domain(ProcessingToken::MULTI_RATE, default_sample_rate);
15}
SampleClock m_clock
The master sample clock for the processing engine.
void ensure_domain(ProcessingToken token, unsigned int rate=0)
Initialize a processing domain if it doesn't exist.
uint32_t m_cleanup_threshold
Threshold for task cleanup.
@ MULTI_RATE
Coroutine can handle multiple sample rates. Picks the frame-accurate processing token by default.
@ FRAME_ACCURATE
Coroutine is frame-accurate.
@ SAMPLE_ACCURATE
Coroutine is sample-accurate.
@ ON_DEMAND
Coroutine is executed on demand, not scheduled.

References ensure_domain(), MayaFlux::Vruta::FRAME_ACCURATE, MayaFlux::Vruta::MULTI_RATE, MayaFlux::Vruta::ON_DEMAND, and MayaFlux::Vruta::SAMPLE_ACCURATE.

+ Here is the call graph for this function: