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

📄 stereo.c

📁 dsp 5416dsk aduio音效code
💻 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 + -