From: David van Moolenbroek Date: Wed, 28 Dec 2016 13:12:15 +0000 (+0000) Subject: libaudiodriver: buffer accounting bugfix X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F84%2F3384%2F1;p=minix.git libaudiodriver: buffer accounting bugfix This fixes #191. Change-Id: I93752161e466b2d03bbcb0838705aab9619c05c8 --- diff --git a/minix/lib/libaudiodriver/audio_fw.c b/minix/lib/libaudiodriver/audio_fw.c index ff3ce5cfd..56a91c99c 100644 --- a/minix/lib/libaudiodriver/audio_fw.c +++ b/minix/lib/libaudiodriver/audio_fw.c @@ -609,6 +609,7 @@ static void handle_int_read(int sub_dev_nr) sub_dev_ptr->DmaLength -= 1; sub_dev_ptr->DmaReadNext = (sub_dev_ptr->DmaReadNext + 1) % sub_dev_ptr->NrOfDmaFragments; + sub_dev_ptr->BufLength += 1; sub_dev_ptr->BufFillNext = (sub_dev_ptr->BufFillNext + 1) % sub_dev_ptr->NrOfExtraBuffers; }