2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
SimpleMono.h
|
|
|
|
|
|
|
|
Dominic Mazzoni
|
|
|
|
|
|
|
|
This abstract class simplifies the implementation of a basic
|
|
|
|
monaural effect. Inherit from it if your effect doesn't just
|
|
|
|
modifies a track in place and doesn't care how many samples
|
|
|
|
it gets at a time. Your derived class only needs to implement
|
2018-03-09 18:11:20 +00:00
|
|
|
GetSymbol, GetEffectAction, and ProcessSimpleMono.
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef __AUDACITY_EFFECT_SIMPLE_MONO__
|
|
|
|
#define __AUDACITY_EFFECT_SIMPLE_MONO__
|
|
|
|
|
|
|
|
#include "Effect.h"
|
|
|
|
|
|
|
|
class WaveTrack;
|
|
|
|
|
2016-02-24 06:06:39 +00:00
|
|
|
class EffectSimpleMono /* not final */ : public Effect
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-02-24 06:06:47 +00:00
|
|
|
bool Process() override;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
protected:
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
// Override this method if you need to do things
|
|
|
|
// before every track (including the first one)
|
2016-02-24 06:06:47 +00:00
|
|
|
// NEW override
|
|
|
|
virtual bool NewTrackSimpleMono() = 0;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
// Override this method to actually process audio
|
2016-09-06 13:19:27 +00:00
|
|
|
virtual bool ProcessSimpleMono(float *buffer, size_t len) = 0;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
protected:
|
2010-01-23 19:44:49 +00:00
|
|
|
// Other useful information
|
|
|
|
int mCurTrackNum;
|
|
|
|
double mCurRate;
|
|
|
|
double mCurT0;
|
|
|
|
double mCurT1;
|
|
|
|
int mCurChannel;
|
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
private:
|
|
|
|
bool ProcessOne(WaveTrack * t, sampleCount start, sampleCount end);
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|