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

◆ seconds_to_units()

uint64_t MayaFlux::Vruta::TaskScheduler::seconds_to_units ( double  seconds,
ProcessingToken  token = ProcessingToken::SAMPLE_ACCURATE 
) const

Convert seconds to processing units for a specific domain.

Parameters
secondsTime in seconds
tokenProcessing domain (default: audio)
Returns
Number of processing units (samples/frames/etc.)

Definition at line 281 of file Scheduler.cpp.

282{
283 unsigned int rate = get_rate(token);
284 return static_cast<uint64_t>(seconds * rate);
285}
unsigned int get_rate(ProcessingToken token=ProcessingToken::SAMPLE_ACCURATE) const
Get processing rate for a domain.

References get_rate().

Referenced by MayaFlux::Kriya::Timer::schedule().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: