From cbe3c98fa122c0c3214f83e7c8e5044823f31e02 Mon Sep 17 00:00:00 2001 From: sniperrifle2004 Date: Sun, 14 Jun 2020 05:52:16 +0200 Subject: [PATCH] Clear buffer when the sink is stopped --- playback/src/audio_backend/alsa.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/playback/src/audio_backend/alsa.rs b/playback/src/audio_backend/alsa.rs index e92ad18e..086bea33 100644 --- a/playback/src/audio_backend/alsa.rs +++ b/playback/src/audio_backend/alsa.rs @@ -111,6 +111,7 @@ impl Sink for AlsaSink { pcm.drain().unwrap(); } self.pcm = None; + self.buffered_data = 0; Ok(()) }