有那位仁兄有这方面的源代码能否给小弟提供,给小弟讲解讲解。我有一个g723.1的源代码,可是看不懂有那位高手能帮忙。感激不尽。

解决方案 »

  1.   

    //压缩音频帧
    BOOL CCodecMgr::EncodeAudioData(char  *pin,int len,char * pout,int* lenr)
    {
    BOOL bRet=FALSE;
    if(!pin||len!=SIZE_AUDIO_FRAME||!pout)
    goto RET;

    va_g729a_encoder((short*)pin,(BYTE*)pout);
    va_g729a_encoder((short*)(pin+160),(BYTE*)pout+10);
    va_g729a_encoder((short*)(pin+320),(BYTE*)pout+20);
    va_g729a_encoder((short*)(pin+480),(BYTE*)pout+30);
    va_g729a_encoder((short*)(pin+640),(BYTE*)pout+40);
    va_g729a_encoder((short*)(pin+800),(BYTE*)pout+50); //FOR DEBUG
    //pout = pin; if(lenr)
    *lenr=SIZE_AUDIO_PACKED; bRet=TRUE;
    RET:
    return bRet;
    }
    //解压缩音频帧
    BOOL CCodecMgr::DecodeAudioData(char  *pin,int len,char * pout,int* lenr)
    {

    BOOL bRet=FALSE;
    if(!pin||len!=SIZE_AUDIO_PACKED||!pout)
    goto RET; va_g729a_decoder((BYTE*)pin,(short*)(pout),0);
    va_g729a_decoder((BYTE*)pin+10,(short*)(pout+160),0);
    va_g729a_decoder((BYTE*)pin+20,(short*)(pout+320),0);
    va_g729a_decoder((BYTE*)pin+30,(short*)(pout+480),0);
    va_g729a_decoder((BYTE*)pin+40,(short*)(pout+640),0);
    va_g729a_decoder((BYTE*)pin+50,(short*)(pout+800),0); if(lenr)
    *lenr=SIZE_AUDIO_FRAME;

    bRet=TRUE;
    RET:
    return bRet;
    }
      

  2.   

    代码发给我看看!
    [email protected]
      

  3.   

    代码发过来看看 ,谢谢![email protected]
      

  4.   

    我身边的同事就做这个的,你方便的话可以发来看看。
    [email protected]