From 0bdfa726cabba0f23770b27e9f2d9885193ebfab Mon Sep 17 00:00:00 2001 From: JasonLG1979 Date: Sat, 24 Jun 2023 15:26:29 -0500 Subject: [PATCH] Remove round from pulse get_latency_pcm, floor math is fine --- playback/src/audio_backend/pulseaudio.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playback/src/audio_backend/pulseaudio.rs b/playback/src/audio_backend/pulseaudio.rs index d60351e9..25ad8c5d 100644 --- a/playback/src/audio_backend/pulseaudio.rs +++ b/playback/src/audio_backend/pulseaudio.rs @@ -140,9 +140,9 @@ impl Sink for PulseAudioSink { self.sink .as_mut() .and_then(|sink| { - sink.get_latency().ok().map(|micro_sec| { - (micro_sec.as_secs_f64() * DECODER_SAMPLE_RATE as f64).round() as u64 - }) + sink.get_latency() + .ok() + .map(|micro_sec| (micro_sec.as_secs_f64() * DECODER_SAMPLE_RATE as f64) as u64) }) .unwrap_or(0) }