From 0b15179219c1d3c12333ba05391d7de70427ee68 Mon Sep 17 00:00:00 2001 From: Ed Date: Fri, 5 Oct 2018 10:21:09 +0100 Subject: [PATCH] Update xua_audiohub.xc https://github.com/xmos/lib_xua/issues/67 --- lib_xua/src/core/audiohub/xua_audiohub.xc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib_xua/src/core/audiohub/xua_audiohub.xc b/lib_xua/src/core/audiohub/xua_audiohub.xc index 11667b04..8448879c 100755 --- a/lib_xua/src/core/audiohub/xua_audiohub.xc +++ b/lib_xua/src/core/audiohub/xua_audiohub.xc @@ -573,15 +573,16 @@ unsigned static AudioHub_MainLoop(chanend ?c_out, chanend ?c_spd_out return command; } - /* Reset frame counter and flip the ADC buffer */ + /* Reset audio to usb counter because we have now completed one USB transfer and flip the ADC buffer */ audioToUsbRatioCounter = 0; - frameCount = 0; readBuffNo = !readBuffNo; } else { ++audioToUsbRatioCounter; } + /* Reset the framecount because we have outputted all channels in the frame now */ + frameCount = 0; } } }