⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 g722_interface.cpp

📁 G722语音压缩算法
💻 CPP
字号:
//---------------------------------------------------------------------------

#include "G722_Interface.h"
extern int g722_init_state(pG722_Handle);
extern int g722_encoder(pG722_Handle ,short *, UINT16 *,int);
extern int g722_decoder(pG722_Handle ,UINT16 *,short *,int);
//---------------------------------------------------------------------------

int G722_EncodeInit( pG722_Handle handle)       //      Encode
{
        g722_init_state( handle );
        return 1;
}
//---------------------------------------------------------------------------

int G722_DecodeInit( pG722_Handle handle)       //      Decode
{
        g722_init_state( handle );
        return 1;
}
//---------------------------------------------------------------------------

// encode
int G722_Encode( pG722_Handle handle, short pcmIn[], UINT16 code[], int n )
{       int i;
        i=g722_encoder( handle, pcmIn, code, n>>2 );
        return i;
}
//---------------------------------------------------------------------------

//decode
int G722_Decode( pG722_Handle handle, UINT16 code[], short pcmOut[], int n )
{       int i;
        i=g722_decoder( handle, code, pcmOut, n );
        return i;
}
//---------------------------------------------------------------------------



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -