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

◆ time_to_position()

uint64_t MayaFlux::Kakshya::time_to_position ( double  time,
double  sample_rate 
)

Convert time (seconds) to position (samples/frames) given a sample rate.

Parameters
timeTime in seconds.
sample_rateSample rate (Hz).
Returns
Position as integer index.

Definition at line 251 of file CoordUtils.cpp.

252{
253 return static_cast<uint64_t>(time * sample_rate);
254}

Referenced by MayaFlux::Kakshya::SoundStreamContainer::time_to_position().

+ Here is the caller graph for this function: