📄 amf_agcrmsn.c
字号:
// Copyright(c) 2006 Analog Devices, Inc. All Rights Reserved
// This software is proprietary and confidential to Analog Devices, Inc. and its licensors.
// File : $Id: //depot/Development/VisualAudio/Modules/Packs/ControlRatePack/2.5.0/SHARC/Source/AMF_AGCRmsN.c#2 $
// Part of : VisualAudio V2.5.0
// Updated : $Date: 2007/07/02 $ by $Author: Kishore $
// Automatically generated VisualAudio render function AMF_AGCRmsN_Render
#include <math.h>
#include "AMF_AGCRmsN.h"
#if 0
void AMF_AGCRmsN_Render(AMF_AGCRmsN * restrict instance, float * restrict * buffers, int tickSize)
{
int numIn;
int channel;
int sample;
float *in, *out;
float recipN = instance->recipN; // 1/N
numIn = 2;
out = buffers[numIn];
/*************************************
* Calculate RMS sample-by-sample for
* N inputs
**************************************/
for (sample = 0; sample < tickSize; sample++)
{
out[sample] = 0.0;
}
for (channel = 0; channel < numIn; channel++)
{
in = buffers[channel];
/*************************************
* Calculate enery sample-by-sample for
* N inputs
**************************************/
for (sample = 0; sample < tickSize; sample++)
{
out[sample] += in[sample] * in[sample];
}
}
for (sample = 0; sample < tickSize; sample++)
{
out[sample] = sqrtf (out[sample]*recipN );
}
}
#endif
SEG_MOD_SLOW_CONST const AMF_ModuleVariableClass AMFClassAGCRmsN = {
/* Flags */
AMFModuleClassFlag_VARIABLE_PIN_COUNT ,
/* Render function */
(AMF_RenderFunction) AMF_AGCRmsN_Render,
/* Bypass function */
(AMF_RenderFunction) 0
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -