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

📄 g722main.c

📁 dsp AD公司ADSP21的代码,里面有FFT FIR IIR EQULIZER G722_21F 等可以在项目中直接应用的代码.此代码的来源是ADI公司自己出版的书籍,此书在美国购得
💻 C
字号:
#include <stdlib.h>
#include "rtdspc.h"

/* Main program for g722 encode and decode demo for PC */

    extern int encode(int,int);
    extern void decode(int);
    extern void reset();

/* outputs of the decode function */
    extern int xout1,xout2;

void main()
{
    int i,j,t1,t2;
    float xf1 = 0.0;
    float xf2 = 0.0;

/* reset, initialize required memory */
    reset();

/* note: the g722 standard calls for 16 KHz for voice operation */
    while(1) {
        t1=0.25*getinput();
        t2=0.25*getinput();

        j=encode(t1,t2);
        decode(j);

/*      printf("\n%5d %5d %3d %5d %5d",t1,t2,j,xout1,xout2);*/

        xf1 = (float)xout1;
        sendout(3.5*xf1);
        xf2 = (float)xout2;
        sendout(3.5*xf2);
    }
}

⌨️ 快捷键说明

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