exp3c5x_4.c

来自「用dsp解压mp3程序的算法」· C语言 代码 · 共 30 行

C
30
字号
/*****************************************************************
*  expc5x_4.c - C program for testing saturation mode in
*               Section 3.7.3.4
*****************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <intrindefs.h>

/****************************************************************
*    Define variable arrays variables
****************************************************************/
 
int sine[8] = {0, 5792, 8191, 5792,0,-5792,-8191,-5792};
int scale = 3;
int i;

void main()
{
  /* Understand the difference between _sshl and _lsshl */
  /* _lsshl can be treated as OVM turn off if long src1 is defined as int src1 */

  for (i=0; i<8; i++)
  {
	sine[i] = _sshl(sine[i],scale);		// OVM mode turned ON
    //  sine[i] = _lsshl(sine[i],scale);	// OVM mode turned OFF
  }
}

⌨️ 快捷键说明

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