Skip to main content

frame_of

Function frame_of 

pub fn frame_of(time: Seconds, rate: SampleRate) -> usize
Expand description

The frame of a time: the time times the rate, rounded to the nearest sample.

A time too large for a frame index gives usize::MAX; note times are at most MAX_NOTE_END, so the fallback does not act on them.