/*-----------------------------------------------------------------------------

� 1999, Steinberg Soft und Hardware GmbH, All Rights Reserved

-----------------------------------------------------------------------------*/
#ifndef __FILTER_H
#define __FILTER_H

#include "public.sdk/source/vst2.x/audioeffectx.h"
#include "iir.h"

class Filter : public AudioEffectX
{
public:
	Filter(audioMasterCallback audioMaster);
	~Filter();

	// Processing
	virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);

	// Program
	virtual void setProgramName (char* name);
	virtual void getProgramName (char* name);

	// Parameters
	virtual void setParameter (VstInt32 index, float value);
	virtual float getParameter (VstInt32 index);
	virtual void getParameterLabel (VstInt32 index, char* label);
	virtual void getParameterDisplay (VstInt32 index, char* text);
	virtual void getParameterName (VstInt32 index, char* text);

	virtual void setSampleRate(float sampleRate);
	virtual void setBlockSize(VstInt32 blockSize);

protected:
	float ftype, forder, fg, q, sm_fg, sm_q, testParam;
	float f_fmin, f_fmax, f_fg_param;
	VstInt32 type, order;
	char programName[32];
	char dbgStr[80];
	IIRPARAM filterParms;
	IIRCOEFF filterCoeff_L[8], filterCoeff_R[8];
};

#endif
