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

📄 lpctest.c

📁 IP网络语音通讯软件源代码. 不可多得的语音源代码
💻 C
字号:
#include <stdio.h>
#include "lpc.h"

/*#define ENCODE/**/
/*#define DECODE/**/

main(argc, argv)
  int argc;
  char **argv;
{
  int nbytes;
  unsigned char buf[180];
  lpcparams_t params;

fprintf(stderr, "S = %d\n", sizeof params);
  lpc_init(sizeof(buf));
#ifndef DECODE
  while ((nbytes = read(0, buf, sizeof(buf))) > 0) {
	lpc_analyze(buf, &params);
#else
  while ((nbytes = read(0, &params, sizeof(params))) > 0) {
#endif
#ifdef ENCODE
	write(1, &params, sizeof params);
#else
	nbytes = lpc_synthesize(&params, 1.0, buf);
	write(1, buf, nbytes);
#endif
  }
}

⌨️ 快捷键说明

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