Lindeni Forum
use AW_MPI_ADEC_SendStream error - Printable Version

+- Lindeni Forum (http://forum.lindeni.org)
+-- Forum: Lindenis V5 (http://forum.lindeni.org/forumdisplay.php?fid=5)
+--- Forum: General Discussion on Lindenis V5 (http://forum.lindeni.org/forumdisplay.php?fid=6)
+--- Thread: use AW_MPI_ADEC_SendStream error (/showthread.php?tid=4821)



use AW_MPI_ADEC_SendStream error - shane - 04-15-2019

HI guy

I used AW_MPI_ADEC_SendStream API,but i get this
"component/AudioDec_Component.c:2258: ComponentThread: Assertion `0' failed"
and
"E/:AudioDec_Component <ComponentThread:2257>: fatal error! why get bitwidth=0 after decode first bs?!" error.

I create audio decode follow this :

---------------------------------------------------------------------------------------------------

    ADEC_CHN_ATTR_S mAdecChnAttr;
    int mAdecChn = 0;


    mAdecChnAttr.mType = PT_AAC;
    mAdecChnAttr.sampleRate = 48000;
    mAdecChnAttr.channels = 2;
    mAdecChnAttr.bitRate = 320 * 1000;     //it's no used on papers
    mAdecChnAttr.bitsPerSample = 16;
    mAdecChnAttr.attachAACHeader = 1;

    AW_MPI_ADEC_CreateChn(mAdecChn, &mAdecChnAttr);

    MPPCallbackInfo cbInfo;
    cbInfo.cookie = NULL;
    cbInfo.callback = (MPPCallbackFuncType)&MPPCallbackFunc;
    AW_MPI_ADEC_RegisterCallback(mAdecChn, &cbInfo);

    MPP_CHN_S ADECChn = {MOD_ID_ADEC, 0, 0};
    MPP_CHN_S AOChn = {MOD_ID_AO, 0, 0};
    ret = AW_MPI_SYS_Bind(&ADECChn, &AOChn);
    if (ret) {
        _DEBUG_MSG("Do Audio AW_MPI_SYS_Bind fail! ret:0x%x\n", ret);
        return;
    }

    ret = AW_MPI_ADEC_StartRecvStream(mAdecChn);
    if (ret)
    {
        _DEBUG_MSG("Do AW_MPI_ADEC_StartRecvStream fail! ret:%d\n", ret);
        return;
    }

    ret = AW_MPI_AO_StartChn(0, 0);
    if (ret)
    {
        _DEBUG_MSG("Do AW_MPI_AO_EnableVirChn fail! ret:%d\n", ret);
        return;
    }

---------------------------------------------------------------------------------------------------

can somebody help me ??