amf_capturen_s.c

来自「ADI SHARC DSP 音频算法标准模块库」· C语言 代码 · 共 58 行

C
58
字号
// 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/2.5.0/SHARC/Source/AMF_CaptureN_S.c#3 $ 
// Part of : VisualAudio V2.5.0 
// Updated : $Date: 2006/10/12 $ by $Author: Fernando $

#include "AudioProcessing.h"
#include "AMF_CaptureN_S.h"

SEG_MOD_FAST_CODE  void
AMF_CaptureN_S_Render (AMF_CaptureN_S * restrict instance,
             AMF_Signal * restrict * buffers, int tickSize)
{
  // Function code for the N channel mono_pcm capture module

  int numIn;
  int channel;
  int sample;
  float *in;
  float *ptr;

  numIn = instance->b.inputPinCount;

  for (channel = 0; channel < numIn; channel++)
    {
      // This is where the data should be written
      ptr = instance->value + (channel * 2 * tickSize);
      in = buffers[channel];
      for (sample = 0; sample < 2*tickSize; sample++)
    {
      *ptr++ = *in++;
    }
    }

}

#ifdef CUSTOMBYPASSFUNCTION
SEG_MOD_FAST_CODE  void
AMF_CaptureN_S_Bypass (AMF_CaptureN_S * restrict instance,
             AMF_Signal * restrict * buffers, int tickSize)
{

}
#endif

SEG_MOD_SLOW_CONST const AMF_ModuleVariableClass AMFClassCaptureN_S = {

  /* Flags */
  AMFModuleClassFlag_VARIABLE_PIN_COUNT,

  /* Render function */
  (AMF_RenderFunction) AMF_CaptureN_S_Render,

  /* Default bypass */
  (AMF_RenderFunction) 0
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?