]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blobdiff - procsdk_audio_x_xx_xx_xx/common/paf_decOpCircBuf.c
Changed pingpong buffering of DDP in circular buffer to triple buffering to prevent...
[processor-sdk/performance-audio-sr.git] / procsdk_audio_x_xx_xx_xx / common / paf_decOpCircBuf.c
index f660bdd47a77d4e90987a1b635412a4abec93070..5bb89adb40407ca0c2009d0cce5e6f5c7c0c1927 100644 (file)
@@ -8,7 +8,7 @@
 #include "paf_decOpCircBuf.h"
 
 #define MAX_NUM_AF_PCM      ( 4 )
-#define MAX_NUM_AF_DDP      ( 2 )
+#define MAX_NUM_AF_DDP      ( 3 ) //Qin - Increased to prevent cb overflow.
 
 #define CB_INIT_RD_LAG      ( 2 )
 
@@ -59,8 +59,8 @@ Int cbInit(
     {
         pCb->maxNumAfCb = MAX_NUM_AF_DDP;
         pCb->afRdIdx = 0;
-        pCb->afWrtIdx = 1;
-        pCb->pcmRdIdx = decOpFrameLen - CB_INIT_RD_LAG*strFrameLen; // 2*256 behind
+        pCb->afWrtIdx = 0;//1;//QIN - Reduce delay to prevent cb overflow. Need further investigation.
+        pCb->pcmRdIdx = 0;//decOpFrameLen - CB_INIT_RD_LAG*strFrameLen; //QIN - Reduce delay to prevent cb overflow. Need further investigation.
         
         // initialize audio frames
         for (n=0; n<pCb->maxNumAfCb; n++)