?? stereo.c
字號:
/*****************************************************************************/
/* FILENAME */
/* stereo.c */
/* */
/* DESCRIPTION */
/* Stereo handling of signals. */
/* */
/* VERSION */
/* 1.01 */
/* */
/* AUTHOR */
/* Bao Xiaojing */
/* */
/* REVISION HISTORY */
/* VER DATE AUTHOR DESCRIPTION */
/* ------------------------------------------------------------------------ */
/* 1.01 2008.12.06 Bao Xiaojing Update 3 audio effects. */
/* 1.00 2002.04.06 Richard Sikora Initial version. */
/* */
/*****************************************************************************/
#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 + -