fn frames_to_duration(frames: usize, rate: usize) -> std::time::Duration {
    let secsf = frames as f64 / rate as f64;
    let secs = secsf as u64;
    let nanos = ((secsf - secs as f64) * 1_000_000_000.0) as u32;
    std::time::Duration::new(secs, nanos)
}
// Convert the given duration in frames at the given sample rate to a `std::time::Duration`.
Convert the given duration in frames at the given sample rate to a `std::time::Duration`.
Convert the given duration in frames at the given sample rate to a ` std :: time :: Duration ` .
fn frames_to_duration(frames: usize, rate: usize) -> std::time::Duration {
    let secsf = frames as f64 / rate as f64;
    let secs = secsf as u64;
    let nanos = ((secsf - secs as f64) * 1_000_000_000.0) as u32;
    std::time::Duration::new(secs, nanos)
}
fn frames_to_duration ( frames : usize , rate : usize ) -> std :: time :: Duration { let secsf = frames as f64 / rate as f64 ; let secs = secsf as u64 ; let nanos = ( ( secsf - secs as f64 ) * 1_000_000_000.0 ) as u32 ; std :: time :: Duration :: new ( secs , nanos ) }
Convert the given duration in frames at the given sample rate to a `std::time::Duration`.
Convert the given duration in frames at the given sample rate to a ` std :: time :: Duration ` .
frames
usize
rate
usize
frames
usize
rate
usize