📄 amf_scalern.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_Scaler.c#3 $
// Part of : VisualAudio V2.5.0
// Updated : $Date: 2006/10/12 $ by $Author: Fernando $
#include "AMF_ScalerN.h"
#include "AMF_Scaler.h"#include <stdlib.h>
void AMF_ScalerN_Render(AMF_ScalerN * 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
SEG_MOD_FAST_CODE voidAMF_ScalerN_Render (AMF_ScalerN * restrict instance, float * restrict * buffers, int tickSize){ // Function code for the N channel audio scaler. // // This utilizes the optimized render function AMF_Scaler_Render() AMF_Scaler S = { AMF_Module_NULL_INIT }; int numChannels; int channel; float *ptrs[2]; float amp; numChannels = instance->b.inputPinCount; for (channel = 0; channel < numChannels; channel++) {
// Setup the data structure for the underlying AMF_Scaler object
S.amp = instance->amp[channel]; // Input buffer ptrs[0] = buffers[channel]; // Output buffer ptrs[1] = buffers[numChannels + channel]; AMF_Scaler_Render (&S, ptrs, tickSize); }}
SEG_MOD_SLOW_CONST const AMF_ModuleClass AMFClassScalerN = {
/* Flags */
0,
/* Render function */
(AMF_RenderFunction)AMF_ScalerN_Render, // render function
/* 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 + -