From a377ba1f9644f46591fce9530272e004eddea94b Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 17 Jan 2022 22:15:00 -0500 Subject: [PATCH] fix clicking if chip rate is less than audio rate --- src/engine/dispatchContainer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/dispatchContainer.cpp b/src/engine/dispatchContainer.cpp index c93c59714..98a2f7f53 100644 --- a/src/engine/dispatchContainer.cpp +++ b/src/engine/dispatchContainer.cpp @@ -59,7 +59,12 @@ void DivDispatchContainer::fillBuf(size_t runtotal, size_t size) { } blip_end_frame(bb[0],runtotal); - blip_read_samples(bb[0],bbOut[0],size,0); + int totalRead=blip_read_samples(bb[0],bbOut[0],size,0); + if (totalRead<(int)size && totalRead>0) { + for (size_t i=totalRead; iisStereo()) { blip_end_frame(bb[1],runtotal);