Filter2

by gulliva on March 9th, 2010
No notes
Syntax: No syntax
Show lines - Hide lines - Show in textbox - Download
__forceinline void ProcessSample(const int smp, double &lowOut, double &highOut)
	{
		lowOut = mL_A0 * smp + mL_A1 * mXm1 + mL_A2 * mXm2 + mL_A3 * mXm3 + mL_A4 * mXm4 - mB1 * mLYm1 - mB2 * mLYm2 - mB3 * mLYm3 - mB4 * mLYm4;
		highOut = mH_A0 * smp + mH_A1 * mXm1 + mH_A2 * mXm2 + mH_A3 * mXm3 + mH_A4 * mXm4 - mB1 * mHYm1 - mB2 * mHYm2 - mB3 * mHYm3 - mB4 * mHYm4;
		// Shuffle history
		mXm4 = mXm3; mXm3 = mXm2; mXm2 = mXm1; mXm1 = smp;
		mLYm4 = mLYm3; mLYm3 = mLYm2; mLYm2 = mLYm1; mLYm1 = lowOut; // low
		mHYm4 = mHYm3; mHYm3 = mHYm2; mHYm2 = mHYm1; mHYm1 = highOut;// high
	}

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS