Audacity 3.2.0
Fade.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 Fade.h
6
7 Dominic Mazzoni
8
9**********************************************************************/
10
11#ifndef __AUDACITY_EFFECT_FADE__
12#define __AUDACITY_EFFECT_FADE__
13
15
17{
18public:
19 EffectFade(bool fadeIn = false);
20 virtual ~EffectFade();
21
22 // ComponentInterface implementation
23
24 ComponentInterfaceSymbol GetSymbol() const override;
25 TranslatableString GetDescription() const override;
26
27 // EffectDefinitionInterface implementation
28
29 EffectType GetType() const override;
30 bool IsInteractive() const override;
31
32 unsigned GetAudioInCount() const override;
33 unsigned GetAudioOutCount() const override;
35 ChannelNames chanMap) override;
37 const float *const *inBlock, float *const *outBlock, size_t blockLen)
38 override;
39
40private:
41 // EffectFade implementation
42
43 bool mFadeIn;
45};
46
47class EffectFadeIn final : public EffectFade
48{
49public:
51
52 EffectFadeIn() : EffectFade{ true } {}
53};
54
55
56class EffectFadeOut final : public EffectFade
57{
58public:
60
61 EffectFadeOut() : EffectFade{ false } {}
62};
63
64#endif
EffectType
ChannelName
static Settings & settings()
Definition: TrackInfo.cpp:69
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
An Effect that reduces the volume to zero over achosen interval.
Definition: Fade.h:17
unsigned GetAudioInCount() const override
How many input buffers to allocate at once.
Definition: Fade.cpp:68
EffectType GetType() const override
Type determines how it behaves.
Definition: Fade.cpp:58
unsigned GetAudioOutCount() const override
How many output buffers to allocate at once.
Definition: Fade.cpp:73
bool ProcessInitialize(EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
Definition: Fade.cpp:78
bool IsInteractive() const override
Whether the effect needs a dialog for entry of settings.
Definition: Fade.cpp:63
sampleCount mSample
Definition: Fade.h:44
EffectFade(bool fadeIn=false)
Definition: Fade.cpp:31
virtual ~EffectFade()
Definition: Fade.cpp:36
TranslatableString GetDescription() const override
Definition: Fade.cpp:49
size_t ProcessBlock(EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override
Called for destructive effect computation.
Definition: Fade.cpp:85
bool mFadeIn
Definition: Fade.h:43
ComponentInterfaceSymbol GetSymbol() const override
Definition: Fade.cpp:42
EffectFadeIn()
Definition: Fade.h:52
static const ComponentInterfaceSymbol Symbol
Definition: Fade.h:50
static const ComponentInterfaceSymbol Symbol
Definition: Fade.h:59
EffectFadeOut()
Definition: Fade.h:61
Base class for many of the effects in Audacity.
Holds a msgid for the translation catalog; may also bind format arguments.
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19
Externalized state of a plug-in.