📄 amf_polynomial_ds.c
字号:
// Copyright(c) 2005 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/2.5.0/SHARC/Source/AMF_Polynomial_DS.c#3 $
// Part of : VisualAudio V2.5.0
// Updated : $Date: 2006/10/12 $ by $Author: Fernando $
#include "AMF_Polynomial_DS.h"
#include "VA_GeneralHelperFunctions.h"
void AMF_Polynomial_DS_Render(AMF_Polynomial_DS * restrict instance,float * restrict * buffers,int tickSize);
// NOTE: The C version of this function is for reference only (it is
// intended just to show the general algorithm that the module
// uses), and it may not have been fully tested
#if 0 // example C code
SEG_MOD_FAST_CODE void AMF_Polynomial_DS_Render(AMF_Polynomial_DS * restrict instance,float * restrict * buffers,int tickSize) {
int i, j, k;
int numCoefs = instance->numCoefs; // filter size
float *coefs = &instance->coefs[0]; // filter coefs
float *in = buffers[0];
float *out = buffers[1];
float x1, x2, tmp1, tmp2;
for (i=0; i<tickSize*2; i+=2) {
x1 = in[i];
x2 = in[i+1];
tmp1 = coefs[0];
tmp2 = coefs[1];
for (j=2; j<2*numCoefs; j+=2)
{
tmp1 = tmp1*x1 + coefs[j];
tmp2 = tmp2*x2 + coefs[j+1];
}
out[i] = tmp1;
out[i+1] = tmp2;
}
}
#endif
SEG_MOD_SLOW_CONST const AMF_ModuleClass AMFClassPolynomial_DS = {
/* Flags */
0,
/* Render function */
(AMF_RenderFunction)AMF_Polynomial_DS_Render, // render function
/* Default bypass */
(void *)0,
/* Input descriptor - 1 input, and it is stereo. */
1, AMF_StereoPin(0),
/* Output descriptor - 1 output, and it is stereo. */
1, AMF_StereoPin(0)
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -