X-Git-Url: https://git.ti.com/gitweb?p=processor-sdk%2Fperformance-audio-sr.git;a=blobdiff_plain;f=processor_audio_sdk_1_00_00_00%2Fpasdk%2Ftest_dsp%2Fframework%2FaspDecOpCircBuf_master.c;h=1e677e35b6875afb4c14869f852ad27cbbd80398;hp=dbeb8100e18af5609d522761c86df08c0586156a;hb=6d29937bcc4e795e4a416f01c9a9cfe5fa2c541c;hpb=e1c84d0a8c17d5d3276a4174b2256b787c54c2ac diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c index dbeb8100..1e677e35 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c @@ -49,12 +49,6 @@ All rights reserved. #define DEF_DEC_OP_FRAME_LEN ( 256 ) // default decoder output frame length #define DEF_STR_FRAME_LEN ( 256 ) // default stream frame length -#define MAX_NUM_AF_PCM ( 4 ) -#define CB_INIT_RD_LAG_PCM ( 2 ) // 0...3 - -#define MAX_NUM_AF_DDP ( 2 ) -#define CB_INIT_RD_LAG_DDP ( 4 ) // 0...5 - // Generate mute AF on circular buffer read static Void cbReadAfMute( PAF_AudioFrame *pAfRd, // audio frame into which to read @@ -114,8 +108,8 @@ Int cbInit( pCb->strFrameLen = DEF_STR_FRAME_LEN; // initialize circular buffer maximum number of audio frames - pCb->maxNumAfCb = MAX_NUM_AF_PCM; - pCb->afWrtIdx = CB_INIT_RD_LAG_PCM; + pCb->maxNumAfCb = ASP_DECOP_CB_MAX_NUM_AF_PCM; + pCb->afWrtIdx = ASP_DECOP_CB_INIT_LAG_PCM; pCb->afRdIdx = 0; pCb->pcmRdIdx = 0; // 2*256 in behind @@ -245,16 +239,17 @@ Int cbInitSourceSel( // initialize circular buffer maximum number of audio frames if (sourceSelect == PAF_SOURCE_PCM) { - pCb->maxNumAfCb = MAX_NUM_AF_PCM; - pCb->afWrtIdx = CB_INIT_RD_LAG_PCM; - pCb->afRdIdx = 0; - pCb->pcmRdIdx = 0; // 2*256 in behind + pCb->maxNumAfCb = ASP_DECOP_CB_MAX_NUM_AF_PCM; + // 2*256 in behind + pCb->afWrtIdx = ASP_DECOP_CB_INIT_WRTIDX_PCM; + pCb->afRdIdx = ASP_DECOP_CB_INIT_RDIDX_PCM; + pCb->pcmRdIdx = 0; // initialize audio frames for (n=0; nmaxNumAfCb; n++) { pAfCb = &pCb->afCb[n]; - pAfCb->sampleDecode = PAF_SOURCE_PCM; + pAfCb->sampleDecode = sourceSelect; PAF_PROCESS_ZERO(pAfCb->sampleProcess); pAfCb->sampleRate = PAF_SAMPLERATE_48000HZ; pAfCb->sampleCount = decOpFrameLen; @@ -268,16 +263,17 @@ Int cbInitSourceSel( } else if (sourceSelect == PAF_SOURCE_DDP) { - pCb->maxNumAfCb = MAX_NUM_AF_DDP; - pCb->afWrtIdx = 1; - pCb->afRdIdx = 0; - pCb->pcmRdIdx = decOpFrameLen - CB_INIT_RD_LAG_DDP*strFrameLen; // 4*256 behind + pCb->maxNumAfCb = ASP_DECOP_CB_MAX_NUM_AF_DDP; + // 4*256 in behind + pCb->afWrtIdx = ASP_DECOP_CB_INIT_WRTIDX_DDP; + pCb->afRdIdx = ASP_DECOP_CB_INIT_RDIDX_DDP; + pCb->pcmRdIdx = decOpFrameLen - ASP_DECOP_CB_INIT_LAG_DDP*strFrameLen; // 4*256 behind // initialize audio frames for (n=0; nmaxNumAfCb; n++) { pAfCb = &pCb->afCb[n]; - pAfCb->sampleDecode = PAF_SOURCE_DDP; + pAfCb->sampleDecode = sourceSelect; PAF_PROCESS_ZERO(pAfCb->sampleProcess); pAfCb->sampleRate = PAF_SAMPLERATE_48000HZ; pAfCb->sampleCount = decOpFrameLen;