view sv/filter/TimeStretchFilter.h @ 99:ca1f73f027f5

fix the play checkBox bug
author benoitrigolleau
date Wed, 11 Jul 2007 12:18:15 +0000
parents 8ebc85f6ce4e
children d94ee3e8dfe1
line wrap: on
line source
/* -*- 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. 
	
	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 _TIME_STRETCH_FILTER_H_
#define _TIME_STRETCH_FILTER_H_

#include "Filter.h"

class TimeStretchFilter : public Filter
{
	Q_OBJECT

public:
	TimeStretchFilter();
	virtual ~TimeStretchFilter();

	virtual PropertyList getProperties() const;
	virtual QString getPropertyLabel(const PropertyName &) const;
	virtual PropertyType getPropertyType(const PropertyName &) const;
	virtual int getPropertyRangeAndValue(const PropertyName &,
                                         int *min, int *max, int *deflt) const;
    virtual QString getPropertyValueLabel(const PropertyName &,
					  int value) const;

	virtual void setProperty(const PropertyName &, int value);

	virtual void putInput(float **input, size_t samples);
	virtual void getOutput(float **output, size_t samples);

	virtual size_t getRequiredInputSamples(size_t outputSamplesNeeded);

protected:

	bool m_bypass;
	bool m_transcheck;
	bool m_peakcheck;
		
	size_t	m_framesize;
	int		m_hop;

	float *m_inputBuffer;

	float m_interpfactor;

	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;

};

#endif