📄 ectest.c
字号:
#include <defBF535.h>
#include <stdio.h>
#include "ec.h"
FILE *fid1;
FILE *fid2;
FILE *fid3;
ec_obj t_ecobj;
int i;
extern void _ec(ec_handle svptr, short *pfar_end_sig, short *pnear_end_sig);;
int main(void)
{
int length = 100;
short far_end_sig[80];
short near_end_sig[80];
ec_handle ecobj_h;
ecobj_h = &t_ecobj;
fid1 = fopen("E:\\project\\ectest_3\\fr_chn_1.pcm","rb");
fid2 = fopen("E:\\project\\ectest_3\\nr_chn_1.pcm","rb");
fid3 = fopen("E:\\project\\ectest_3\\nlms_out.pcm","wb");
for (i = 0; i < 2000; i++)
{
fread(far_end_sig, sizeof(short), 80, fid1);
fread(near_end_sig, sizeof(short), 80, fid2);
ec(ecobj_h, far_end_sig, near_end_sig);
fwrite(near_end_sig, sizeof(short), 80, fid3);
}
fclose(fid1);
fclose(fid2);
fclose(fid3);
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -