From 3baead9b0beaa07d30ef581b31498ecd0dc06a09 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 10 Nov 2023 16:12:15 +0100 Subject: [PATCH] alsa: reset ready_offset when we clear the queue So that we start from the first sample of a new ready buffer. --- spa/plugins/alsa/alsa-pcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 184052149..a74242bfe 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -2268,6 +2268,7 @@ static void reset_buffers(struct state *this) spa_list_init(&this->free); spa_list_init(&this->ready); + this->ready_offset = 0; for (i = 0; i < this->n_buffers; i++) { struct buffer *b = &this->buffers[i];