summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 256dcf2)
raw | patch | inline | side by side (parent: 256dcf2)
author | Frank Livingston <frank-livingston@ti.com> | |
Fri, 23 Jun 2017 02:43:00 +0000 (21:43 -0500) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Fri, 23 Jun 2017 02:43:00 +0000 (21:43 -0500) |
diff --git a/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c b/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c
index 38b90f146ca671b223f0aa7b807ab78d548db578..d40165830109863a82893321c12b0f2f727d6383 100644 (file)
Int cbReadAf(
PAF_AST_DecOpCircBufCtl *pCbCtl, // decoder output circular buffer control
Int8 cbIdx, // decoder output circular buffer index
- PAF_AudioFrame *pAfRd // audio frame into which to read
+ PAF_AudioFrame *pAfRd, // audio frame into which to read
+ Int8 *pCbDrained // pointer to boolean, indicates if circular buffer drained: FALSE - not drained, TRUE - drained
)
{
IArg key;
Int8 i;
Int16 j;
Int8 numMetadata = 0;
-
+
+ *pCbDrained = 0; // initialize drained indicator
+
// Get gate handle
gateHandle = pCbCtl->gateHandle;
// Enter gate
if (pCb->numAfCb <= 0)
{
pCb->drainFlag = 0;
+ *pCbDrained = 1; // update drained indicator
}
}
diff --git a/pasdk/test_dsp/framework/aspDecOpCircBuf_master.h b/pasdk/test_dsp/framework/aspDecOpCircBuf_master.h
index e06c5ff3d4a49f26bfeb864d2a81d3cd7adcaf15..81104a5cda131e3958450319df99460b8405ad66 100644 (file)
Int cbReadAf(
PAF_AST_DecOpCircBufCtl *pCbCtl, // decoder output circular buffer control
Int8 cbIdx, // decoder output circular buffer index
- PAF_AudioFrame *pAfRd // audio frame into which to read
+ PAF_AudioFrame *pAfRd, // audio frame into which to read
+ Int8 *pCbDrained // pointer to boolean, indicates if circular buffer drained: FALSE - not drained, TRUE - drained
);
#endif /* _ASP_DECOP_CB_MASTER_H_ */
diff --git a/pasdk/test_dsp/framework/audioStreamOutProc.c b/pasdk/test_dsp/framework/audioStreamOutProc.c
index f7135cf862c7ab59c353898da43335591865af38..ded055aa6133bae549d84fefffb3117c0082ae3b 100644 (file)
return errno;
} //PAF_ASOT_decodeInfo2
+
+PAF_AST_DecOpCircBufStats gCbStats; // FL: debug
// -----------------------------------------------------------------------------
// ASOT Decoding Function - Stream Processing
//
Int z; /* decode/stream counter */
PAF_AudioFrame *pAfRd;
Int cbErrno;
+ PAF_AST_DecOpCircBufStats cbStats; /* circular buffer statistics */
+ Int8 cbDrained;
Int errno;
//
pAfRd = pAstCfg->xStr[zS].pAudioFrame;
//GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_106);
- cbErrno = cbReadAf(pCbCtl, z, pAfRd);
+ cbErrno = cbReadAf(pCbCtl, z, pAfRd, &cbDrained);
if ((cbErrno < 0) && (cbErrno != ASP_DECOP_CB_READ_UNDERFLOW))
{
gCbReadAfErr++;
}
#endif
+ // FL: debug
+ // Get circular buffer statistics (debug)
+ //cbGetStats(pCbCtl, z, &cbStats);
+ cbGetStats(pCbCtl, z, &gCbStats);
+
// FL: debug
cbLog(pCbCtl, z, 1, "PAF_ASOT_decodeStream:cbReadAf");
//if (capAfWrite(pAfRd, 0) != CAP_AF_SOK)