Mobile STK for Symbian OS V0.1

源代码在线查看: function.cpp

软件大小: 652 K
上传用户: wzsq12
关键词: Symbian Mobile 0.1 STK
下载地址: 免注册下载 普通下载 VIP

相关代码

				/***************************************************/				/*! \class Function				    \brief STK abstract function parent class.								    This class provides common functionality for STK classes which				    implement tables or other types of input to output function				    mappings.								    by Perry R. Cook and Gary P. Scavone, 1995 - 2005.				*/				/***************************************************/								#include "Function.h"								Function :: Function() : Stk()				{				  lastOutput_ = (StkFloat) 0.0;				}								Function :: ~Function()				{				}								StkFloat Function :: tick( StkFloat input )				{				  return computeSample( input );				}								StkFrames& Function :: tick( StkFrames& frames, unsigned int channel )				{				  if ( channel >= frames.channels() ) {				#if !defined(SYMBIAN)				    errorString_ 				    handleError( StkError::FUNCTION_ARGUMENT );				#endif				  }								  if ( frames.channels() == 1 ) {				    for ( unsigned int i=0; i				      frames[i] = computeSample( frames[i] );				  }				  else if ( frames.interleaved() ) {				    unsigned int hop = frames.channels();				    unsigned int index = channel;				    for ( unsigned int i=0; i				      frames[index] = computeSample( frames[index] );				      index += hop;				    }				  }				  else {				    unsigned int iStart = channel * frames.frames();				    for ( unsigned int i=0; i				      frames[iStart] = computeSample( frames[iStart] );				  }								  return frames;				}							

相关资源