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

◆ schedule_sequence()

MAYAFLUX_API void MayaFlux::schedule_sequence ( std::vector< std::pair< double, std::function< void()> > >  sequence,
std::string  name = "",
Vruta::ProcessingToken  token = Vruta::ProcessingToken::SAMPLE_ACCURATE 
)

Creates a sequence task that calls functions at specified times and addes it to the default scheduler list for evaluation.

Parameters
sequenceVector of (time, function) pairs
nameName of the metronome task (optional but recommended). If not provided, a default name will be generated.
tokenProcessing token to determine which scheduler rate to use (default: SAMPLE_ACCURATE)

Uses the task scheduler from the default engine.

Definition at line 49 of file Chronie.cpp.

50{
51 auto scheduler = get_scheduler();
52 if (name.empty()) {
53 name = "seq_" + std::to_string(scheduler->get_next_task_id());
54 }
55
56 auto tseq = Kriya::sequence(std::move(seq), token);
57
58 get_scheduler()->add_task(tseq, name, false);
59}
std::shared_ptr< Vruta::TaskScheduler > get_scheduler()
Gets the task scheduler from the default engine.
Definition Chronie.cpp:22

References get_scheduler(), and MayaFlux::Kriya::sequence().

+ Here is the call graph for this function: