MayaFlux 0.4.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 9 of file Scheduler.cpp.

10 : m_clock(default_sample_rate)
12 , m_registered_sample_rate(default_sample_rate)
13 , m_registered_frame_rate(default_frame_rate)
14{
15 s_registered_sample_rate = default_sample_rate;
16 s_registered_frame_rate = default_frame_rate;
19 ensure_domain(ProcessingToken::MULTI_RATE, default_sample_rate);
21}
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.
uint32_t s_registered_frame_rate
Definition ChronUtils.hpp:6
@ 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.
uint32_t s_registered_sample_rate
Definition ChronUtils.hpp:5

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

+ Here is the call graph for this function: