Better fix to avoid zero length packets being added to input buffer before SoF case starts working

This commit is contained in:
Ed
2020-09-01 17:53:03 +01:00
parent 2e8e57d5fa
commit 0286ca093d

View File

@@ -38,8 +38,9 @@ extern unsigned int g_curSamFreqMultiplier;
#endif
/* Global var for speed. Related to feedback. Used by input stream to determine IN packet size */
unsigned g_speed;
/* Initialise so we get a sensible packet size until we start properly calculating feedback in the SoF case */
/* Without this, zero size packets fill the input FIFO and take time to clear out when feedback starts */
unsigned g_speed = (AUDIO_CLASS == 2) ? (DEFAULT_FREQ/8000) << 16 : (DEFAULT_FREQ/1000) << 16;
unsigned g_freqChange = 0;
unsigned feedbackValid = 0;