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

◆ position_to_time()

double MayaFlux::Kakshya::position_to_time ( uint64_t  position,
double  sample_rate 
)

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

Parameters
positionPosition as integer index.
sample_rateSample rate (Hz).
Returns
Time in seconds.

Definition at line 256 of file CoordUtils.cpp.

257{
258 return static_cast<double>(position) / sample_rate;
259}

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

+ Here is the caller graph for this function: