get paid to paste

StkFrames& JCRev :: tick( StkFrames& iFrames, StkFrames& oFrames, unsigned int iChannel, unsigned int oChannel )
{
#if defined(_STK_DEBUG_)
  if ( iChannel >= iFrames.channels() || oChannel >= oFrames.channels() - 1 ) {
    errorString_ << "JCRev::tick(): channel and StkFrames arguments are incompatible!";
    handleError( StkError::FUNCTION_ARGUMENT );
  }
#endif

  StkFloat *iSamples = &iFrames[iChannel];
  StkFloat *oSamples = &oFrames[oChannel];
  // I've adjusted oHop to be one less than oFrames.channels(), because it's being incremented
  // inside the loop in order to write a stereo signal
  unsigned int iHop = iFrames.channels(), oHop = oFrames.channels() - 1;
  for ( unsigned int i=0; i<iFrames.frames(); i++, iSamples += iHop, oSamples += oHop ) {
    *oSamples++ = tick( *iSamples );
    *oSamples = lastFrame_[1];
  }

  return iFrames;
}

Pasted: Mar 2, 2011, 12:00:34 am
Views: 20