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

📄 clip.c

📁 语音CELP压缩解压源代码(C语音)
💻 C
字号:
/**************************************************************************** ROUTINE*               clip** FUNCTION*		determine if speech is clipped** SYnoPSIS*               function clip(s, l)**   formal **                       data    I/O*       name            type    type    function*       -------------------------------------------------------------------*	s		float	i	input speech*	l		int	i	length of input speech****************************************************************************** CALLED BY**	celp** CALLS*****************************************************************************/#include <math.h>#define TRUE	1#define FALSE	0clip(s, l)int l;float s[];{  int i, count;  float sum;  /*	Count number of clippings and sum their magnitudes		*/  count = 0;  sum = 0.0;  for (i = 0; i < l; i++)  {    if (fabs(s[i]) > 32768.0)    {      count++;      sum += fabs(s[i]);    }  }  /*	Clipping heuristics (could also use energy, delta energy, etc.)	*/  return(((count >= 10) || (count >= 5 && sum > 1.e6)) ? TRUE : FALSE);}

⌨️ 快捷键说明

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