PASDK-568:Update CB read to properly set AF sample count
authorFrank Livingston <frank-livingston@ti.com>
Wed, 18 Apr 2018 19:31:33 +0000 (14:31 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Wed, 18 Apr 2018 19:31:33 +0000 (14:31 -0500)
cbReadAf():
AF sample count set to number of PCM samples read from PCM buffer in case
of partial read (fewer PCM samples in buffer than number of PCM samples
requested in read).
Update code to set AF sample count to number of PCM
samples requested in read.
If CB in drain state, this isn't an underflow (e.g. EOS trailing samples).
If CB not in drain state, this is logged as an underflow.

pasdk/test_dsp/framework/aspDecOpCircBuf_master.c

index b54a0f979b4401d8410c251d3e4ab0d058acbbd9..8b1befd33a61e838562f17ce95b3b91334ad8a81 100644 (file)
@@ -624,6 +624,8 @@ Int cbReadAf(
        
         if (totNumSampsRd < pCb->strFrameLen)
         {
+            pAfRd->sampleCount = pCb->strFrameLen;  // update Read AF sample count for partial frame
+
             // Clear remaining Read AF PCM samples
                        if (pAfRd->bsMetadata_type == PAF_bsMetadata_DTS_X)
                        {