Audacity 3.2.0
Generator.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 Generator.h
6
7 Effects that generate audio can derive from Generator.
8
9 Dominic Mazzoni
10 Vaughan Johnson
11
12**********************************************************************/
13
14
15#ifndef __AUDACITY_GENERATOR__
16#define __AUDACITY_GENERATOR__
17
18#include "StatefulEffect.h"
19#include "SampleCount.h"
20
21class TrackList;
22
23// Base class for Generators (effects which fill a given duration)
24class BUILTIN_EFFECTS_API Generator /* not final */ : public StatefulEffect
25{
26public:
28
29protected:
31
36 = 0;
37
38 // Precondition:
39 // mDuration is set to the amount of time to generate in seconds
40 // Postcondition:
41 // If mDuration was valid (>= 0), then the tracks are replaced by the
42 // generated results and true is returned. Otherwise, return false.
43 bool Process(EffectInstance &instance, EffectSettings &settings) override;
44};
45
46#endif
static Settings & settings()
Definition: TrackInfo.cpp:51
Performs effect computation.
virtual bool GenerateTrack(const EffectSettings &settings, WaveTrack &tmp)=0
GenerateTrack() must be overridden by the actual generator class.
Generator()
Definition: Generator.h:27
virtual bool Process(EffectInstance &instance, EffectSettings &settings)=0
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Definition: Track.h:850
A Track that contains audio waveform data.
Definition: WaveTrack.h:203
Externalized state of a plug-in.