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

📄 stereo.c

📁 基于TMS320C5416平台的谱分析程序
💻 C
字号:
/*****************************************************************************/
/*                                                                           */
/* FILENAME                                                                  */
/* 	stereo.c                                                                 */
/*                                                                           */
/* DESCRIPTION                                                               */
/*   TMS320C5416 DSK.                                                        */
/*   Conversion from stereo to mono.                                         */
/*                                                                           */
/* REVISION                                                                  */
/*   Revision: 1.00	                                                         */
/*   Author  : Richard Sikora                                                */
/*---------------------------------------------------------------------------*/
/*                                                                           */
/* HISTORY                                                                   */
/*   Revision: 1.00                                                          */
/*   6th April 2002. Created by Richard Sikora.                              */
/*                                                                           */
/*****************************************************************************/

#include <stdio.h>


/*****************************************************************************/
/* stereo_to_mono()                                                          */
/*---------------------------------------------------------------------------*/
/*                                                                           */
/* INPUTS:  left and right channel (stereo) information.                     */
/*                                                                           */
/* RETURNS: Average of two input channels (mono)                             */
/*                                                                           */
/*****************************************************************************/

signed int stereo_to_mono(signed int left_channel, signed int right_channel)
{
 signed long temp;
 
 /* Take average of left and right channels. */
 
 temp = (signed long) left_channel + (signed long) right_channel;
 
 temp >>= 1;    /* Divide by 2 to prevent overload at output */
 
 return ((signed int) temp); /* Return mono value to calling function */
}

/*****************************************************************************/
/* End of stereo.c                                                           */
/*****************************************************************************/

⌨️ 快捷键说明

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