Audacity 3.2.0
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 "StatefulEffect.h"
21
22class WaveTrack;
23
24class EffectSimpleMono /* not final */ : public StatefulEffect
25{
26public:
27 bool Process(EffectInstance &instance, EffectSettings &settings) override;
28
29protected:
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
39protected:
40 // Other useful information
42 double mCurRate;
43 double mCurT0;
44 double mCurT1;
45
46private:
48};
49
50#endif
static Settings & settings()
Definition: TrackInfo.cpp:83
Performs effect computation.
An abstract Effect class that simplifies the implementation of a basic monaural effect....
Definition: SimpleMono.h:25
virtual bool NewTrackSimpleMono()=0
Definition: SimpleMono.cpp:126
bool ProcessOne(WaveTrack *t, sampleCount start, sampleCount end)
Definition: SimpleMono.cpp:78
bool Process(EffectInstance &instance, EffectSettings &settings) override
Definition: SimpleMono.cpp:30
virtual bool ProcessSimpleMono(float *buffer, size_t len)=0
A Track that contains audio waveform data.
Definition: WaveTrack.h:59
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159
Externalized state of a plug-in.