diff sv/filter/MultiRealTimeFilter.h @ 223:c413e82a4812

reorganise RealTimeFilter for Equalizer integration
author lbajardsilogic
date Mon, 11 Feb 2008 15:17:54 +0000
parents
children 7d5d51145b81
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sv/filter/MultiRealTimeFilter.h	Mon Feb 11 15:17:54 2008 +0000
@@ -0,0 +1,78 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*	Sound Access	
+		EASAIER client application.	
+		Silogic 2007. Laure Bajard. 
+	
+	Integration of the filter provided by:
+	Dublin Institute of Technology - Audio Research Group 2007
+	www.audioresearchgroup.com
+	Author: Dan Barry
+
+	This program is free software; you can redistribute it and/or    
+	modify it under the terms of the GNU General Public License as    
+	published by the Free Software Foundation; either version 2 of the    
+	License, or (at your option) any later version.  See the file    
+	COPYING included with this distribution for more information.
+*/
+
+#ifndef _MULTI_REAL_TIME_FILTER_H_
+#define _MULTI_REAL_TIME_FILTER_H_
+
+#include "Filter.h"
+#include "TimeStretchFilter.h"
+#include "EqualizerFilter.h"
+
+class MultiRealTimeFilter : public Filter
+{
+	Q_OBJECT
+
+public:
+	MultiRealTimeFilter();
+	virtual ~MultiRealTimeFilter();
+
+	virtual void putInput(float **input, size_t samples);
+	virtual void getOutput(float **output, size_t samples);
+
+	virtual size_t getRequiredInputSamples(size_t outputSamplesNeeded);
+	size_t getRequiredSkipSamples();
+
+	virtual bool allowMultiple(){return false;}
+
+signals: 
+	void playSpeedChanged(float);
+
+public slots :
+	void setFilterEnabled(bool b);
+	void setFilterEnabled(int b);
+
+protected:
+
+	size_t	m_framesize;
+	int		m_hop;
+
+	int		m_transhold;
+
+	float *m_inputBuffer;
+
+	float *audioframe;
+	float *prev_audioframe;
+	float *window;
+	float *processedframe;
+	float *outbuffer;
+	float *holdbuffer3;
+	float *holdbuffer2;
+	float *holdbuffer1;
+
+	float *c_phase;		///CURRENT FRAME phases
+	float *p_phase;		///PREVIOUS FRAME phases
+	float *c_synthphase;
+	float *p_synthphase;
+	float *synthframe;
+
+	TimeStretchFilter * m_timeStretchFilter;
+	EqualizerFilter *	m_equalizerFilter;
+
+};
+
+#endif
\ No newline at end of file