template<typename T>
//audio data frame managing audio samples
class frame {};

/* 
 * t1, t2... tn classes are very different in the way they are processing audio
 * data so can't have the same base type but they have some common functions such
 * as process and reset.
 */
template<typename T>
class test1 {
public:	
	void reset() {}
	int process(const frame<T>& in, frame<T>& out) {}
};

template<typename T>
class test2 {
public:
	void reset() {}
	int process(const frame<T>& in, frame<T>& out);
};

template<typename T>
class test3 {
public:
	void reset() {}
	int process(const frame<T>& in, frame<T>& out);
};

int main()
{
	test1<int> *t1 = new test1<int>();
	test2<int> *t2 = new test2<int>();
	test3<int> *t3 = new test3<int>();
	frame<int> iFrame;
	frame<int> oFrame;
	
	/* some code here to initialize audio processing blocks */
	//snip

	/*
	 * order of audio processing is important here.
	 * Is there any way to avoid writing below code
	 * for every processing block that gets added in
	 * future in c++11 perhaps??
	 */
	if (t1) {
		t1->process(iFrame, oFrame);
		iFrame = oFrame;
	}
	if (t2) {
		t2->reset();
		t2->process(iFrame, oFrame);
		iFrame = oFrame;
	}
	if (t3) {
		t3->process(iFrame, oFrame);
		iFrame = oFrame;
	}	
}