MayaFlux 1.0.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 379 of file Scheduler.cpp.

380{
381 unsigned int rate = get_rate(token);
382 return static_cast<uint64_t>(seconds * rate);
383}
float rate
unsigned int get_rate(ProcessingToken token=ProcessingToken::SAMPLE_ACCURATE) const
Get processing rate for a domain.

References get_rate(), and rate.

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

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