Audacity  3.0.3
SimpleMono.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  SimpleMono.h
6 
7  Dominic Mazzoni
8 
9  This abstract class simplifies the implementation of a basic
10  monaural effect. Inherit from it if your effect doesn't just
11  modifies a track in place and doesn't care how many samples
12  it gets at a time. Your derived class only needs to implement
13  GetSymbol, GetEffectAction, and ProcessSimpleMono.
14 
15 **********************************************************************/
16 
17 #ifndef __AUDACITY_EFFECT_SIMPLE_MONO__
18 #define __AUDACITY_EFFECT_SIMPLE_MONO__
19 
20 #include "Effect.h"
21 
22 class WaveTrack;
23 
24 class EffectSimpleMono /* not final */ : public Effect
25 {
26 public:
27  bool Process() override;
28 
29 protected:
30 
31  // Override this method if you need to do things
32  // before every track (including the first one)
33  // NEW override
34  virtual bool NewTrackSimpleMono() = 0;
35 
36  // Override this method to actually process audio
37  virtual bool ProcessSimpleMono(float *buffer, size_t len) = 0;
38 
39 protected:
40  // Other useful information
42  double mCurRate;
43  double mCurT0;
44  double mCurT1;
46 
47 private:
48  bool ProcessOne(WaveTrack * t, sampleCount start, sampleCount end);
49 };
50 
51 #endif
EffectSimpleMono
An abstract Effect class that simplifies the implementation of a basic monaural effect....
Definition: SimpleMono.h:25
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:69
Effect.h
EffectSimpleMono::mCurChannel
int mCurChannel
Definition: SimpleMono.h:45
Effect
Base class for many of the effects in Audacity.
Definition: Effect.h:72
EffectSimpleMono::Process
bool Process() override
Definition: SimpleMono.cpp:29
EffectSimpleMono::ProcessSimpleMono
virtual bool ProcessSimpleMono(float *buffer, size_t len)=0
EffectSimpleMono::ProcessOne
bool ProcessOne(WaveTrack *t, sampleCount start, sampleCount end)
Definition: SimpleMono.cpp:77
sampleCount
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:18
EffectSimpleMono::NewTrackSimpleMono
virtual bool NewTrackSimpleMono()=0
Definition: SimpleMono.cpp:125
EffectSimpleMono::mCurT0
double mCurT0
Definition: SimpleMono.h:43
EffectSimpleMono::mCurRate
double mCurRate
Definition: SimpleMono.h:42
EffectSimpleMono::mCurTrackNum
int mCurTrackNum
Definition: SimpleMono.h:41
EffectSimpleMono::mCurT1
double mCurT1
Definition: SimpleMono.h:44