[processor-sdk/performance-audio-sr.git] / processor_audio_sdk_1_00_00_00 / pasdk / common / paf_decOpCircBuf.h
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/common/paf_decOpCircBuf.h b/processor_audio_sdk_1_00_00_00/pasdk/common/paf_decOpCircBuf.h
index b7bcf6c3e1cec9e80b83776fade6975337d804c5..d721228f8d31d979b1a248e1bc8363b147ea9e79 100644 (file)
#define PAF_DECOP_CB_PCM_BUF_SZ ( PAF_DECOP_CB_MAX_NUM_PCM_CH * PAF_DECOP_CB_MAX_NUM_PCM_FRAMES * PAF_DECOP_CB_MAX_PCM_FRAME_LEN )
// Decoder output circular buffer
-typedef struct PAF_DecodeOpCircBuf {
- PAF_AudioFrame *afCb; // audio frame CB
- PAF_AudioData *pcmBuf; // PCM buffer, contains PCM data associated with audio frames
- Int8 *metaBuf; // metafdata buffer, contains metadata associated with audio frames //QIN
- Int8 afRdIdx; // audio frame CB read index
- Int8 afWrtIdx; // audio frame CB write index
- Int16 pcmRdIdx; // pcm buffer read index
- Int8 numAfCb; // current number frames in CB
- Int8 maxNumAfCb; // maximum number of audio frames in CB
- Int16 decOpFrameLen; // selected decoder output frame length (input transaction size)
- Int16 strFrameLen; // stream frame length (output transaction size)
- Int8 writerActiveFlag; // flag indicates whether CB writer is active
- Int8 readerActiveFlag; // flag indicates whether CB reader is active
- Int8 emptyFlag; // flag indicates whether reader should empty (drain) remaining frames in CB
- Int8 errUndCnt; // underflow count
- Int8 errOvrCnt; // overflow count
-} PAF_DecodeOpCircBuf;
+typedef struct PAF_AST_DecOpCircBuf
+{
+ PAF_AudioFrame *afCb; // audio frame CB
+ PAF_AudioData *pcmBuf; // PCM buffer, contains PCM data associated with audio frames
+ Int8 *metaBuf; // metafdata buffer, contains metadata associated with audio frames //QIN
+ Int8 afRdIdx; // audio frame CB read index
+ Int8 afWrtIdx; // audio frame CB write index
+ Int16 pcmRdIdx; // pcm buffer read index
+ Int8 numAfCb; // current number frames in CB
+ Int8 maxNumAfCb; // maximum number of audio frames in CB
+ Int16 decOpFrameLen; // selected decoder output frame length (input transaction size)
+ Int16 strFrameLen; // stream frame length (output transaction size)
+ Int8 writerActiveFlag; // flag indicates whether CB writer is active
+ Int8 readerActiveFlag; // flag indicates whether CB reader is active
+ Int8 emptyFlag; // flag indicates whether reader should empty (drain) remaining frames in CB
+ Int8 errUndCnt; // underflow count
+ Int8 errOvrCnt; // overflow count
+} PAF_AST_DecOpCircBuf;
// Initialize circular buffer
Int cbInit(
Int8 sourceSelect, // source select (PCM, DDP, etc.)
Int16 decOpFrameLen, // decoder output frame length (PCM samples)
Int16 strFrameLen, // stream frame length (PCM samples)
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
Int8 resetRwFlags // whether to reset reader, writer, and empty flags
);
// Start writes to circular buffer
Int cbWriteStart(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
);
// Stop writes to circular buffer
Int cbWriteStop(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
);
// Start reads from circular buffer
Int cbReadStart(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
);
// Stop reads from circular buffer
Int cbReadStop(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
);
// Read audio frame from circular buffer
Int cbReadAf(
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
PAF_AudioFrame *pAfRd // audio frame into which to read
);
// Write audio frame to circular buffer
Int cbWriteAf(
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
PAF_AudioFrame *pAfWrt // audio frame from which to write
);
// Get next audio frame to write in circular buffer
Int cbGetNextWriteAf(
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
PAF_AudioFrame **ppAfWrt // audio frame next to be written
);
// Output log of circular buffer control variables (debug)
Int cbLog(
- PAF_DecodeOpCircBuf *pCb,
+ PAF_AST_DecOpCircBuf *pCb,
Int8 fullLog,
char *locInfo
);