Update xua_audiohub.xc

https://github.com/xmos/lib_xua/issues/67
This commit is contained in:
Ed
2018-10-05 10:21:09 +01:00
committed by GitHub
parent 7bac8d1d77
commit 0b15179219

View File

@@ -573,15 +573,16 @@ unsigned static AudioHub_MainLoop(chanend ?c_out, chanend ?c_spd_out
return command; 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; audioToUsbRatioCounter = 0;
frameCount = 0;
readBuffNo = !readBuffNo; readBuffNo = !readBuffNo;
} }
else else
{ {
++audioToUsbRatioCounter; ++audioToUsbRatioCounter;
} }
/* Reset the framecount because we have outputted all channels in the frame now */
frameCount = 0;
} }
} }
} }