mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 06:04:16 +00:00
parent
3aba98639c
commit
1fb86e656d
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ where
|
|||
/// Returns the duration elapsed for each sample extracted.
|
||||
#[inline]
|
||||
fn get_duration_per_sample(input: &I) -> Duration {
|
||||
let ns = NANOS_PER_SEC / input.sample_rate() as u64 * input.channels() as u64;
|
||||
let ns = NANOS_PER_SEC / (input.sample_rate() as u64 * input.channels() as u64);
|
||||
// \|/ the maximum value of `ns` is one billion, so this can't fail
|
||||
Duration::new(0, ns as u32)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue