📄 amf_scalernsmoothed.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_ScalerSmoothed.c#3 $
// Part of : VisualAudio V2.5.0
// Updated : $Date: 2006/10/12 $ by $Author: Fernando $
#include "AMF_ScalerNSmoothed.h"
#include "AMF_ScalerSmoothed.h"
#include <stdlib.h>
void AMF_ScalerNSmoothed_Render(AMF_ScalerNSmoothed * 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
#pragma optimize_for_speed
SEG_MOD_FAST_CODE void AMF_ScalerNSmoothed_Render(AMF_ScalerNSmoothed * restrict instance,float * restrict * buffers,int tickSize)
{
AMF_ScalerSmoothed S = { AMF_Module_NULL_INIT }; int numChannels; int channel; float *ptrs[2]; numChannels = instance->b.inputPinCount; // Setup the data structure for the underlying AMF_ScalerSmoothed object // These initializations happens once S.ampSmoothing = instance->ampSmoothing; for (channel = 0; channel < numChannels; channel++) { S.ampTarget = instance->ampTarget[channel]; // This has to be reset at the start of each channel S.amp = instance->amp[channel]; // Input buffer ptrs[0] = buffers[channel]; // Output buffer ptrs[1] = buffers[numChannels + channel]; AMF_ScalerSmoothed_Render (&S, ptrs, tickSize); // Save the state variable back into the structure instance->amp[channel] = S.amp; }
}
SEG_MOD_SLOW_CONST const AMF_ModuleClass AMFClassScalerNSmoothed =
{
/** Flags. */
0,
/** Reference to render function. */
(AMF_RenderFunction) AMF_ScalerNSmoothed_Render,
/* Default bypass */
(void *)0,
/* Input descriptor - 1 input, and it is mono. */
1, 0,
/* Output descriptor - 1 output, and it is mono. */
1, 0,
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -