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#pragma once
11
13
14class BUILTIN_EFFECTS_API Fade : public StatefulPerTrackEffect
15{
16public:
17 Fade(bool fadeIn = false);
18 virtual ~Fade() override;
19
20 // EffectDefinitionInterface implementation
21
22 EffectType GetType() const override;
23 bool IsInteractive() const override;
24
25 unsigned GetAudioInCount() const override;
26 unsigned GetAudioOutCount() const override;
29 ChannelNames chanMap) override;
30 size_t ProcessBlock(
31 EffectSettings& settings, const float* const* inBlock,
32 float* const* outBlock, size_t blockLen) override;
33
34protected:
35 // EffectFade implementation
36
37 bool mFadeIn;
39};
40
41class BUILTIN_EFFECTS_API FadeIn final : public Fade
42{
43public:
45
46 FadeIn();
47
48 // ComponentInterface implementation
49 ComponentInterfaceSymbol GetSymbol() const override;
50 TranslatableString GetDescription() const override;
51};
52
53class BUILTIN_EFFECTS_API FadeOut final : public Fade
54{
55public:
57
58 FadeOut();
59
60 // ComponentInterface implementation
61 ComponentInterfaceSymbol GetSymbol() const override;
62 TranslatableString GetDescription() const override;
63};
EffectType
ChannelName
static Settings & settings()
Definition: TrackInfo.cpp:51
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
virtual EffectType GetType() const =0
Type determines how it behaves.
TranslatableString GetDescription() const override
Definition: Effect.cpp:64
ComponentInterfaceSymbol GetSymbol() const override
Definition: Effect.cpp:49
bool IsInteractive() const override
Whether the effect needs a dialog for entry of settings.
Definition: Effect.cpp:76
Definition: Fade.h:15
bool mFadeIn
Definition: Fade.h:37
sampleCount mSample
Definition: Fade.h:38
Definition: Fade.h:42
static const ComponentInterfaceSymbol Symbol
Definition: Fade.h:44
Definition: Fade.h:54
static const ComponentInterfaceSymbol Symbol
Definition: Fade.h:56
virtual unsigned GetAudioOutCount() const
How many output buffers to allocate at once.
virtual unsigned GetAudioInCount() const
How many input buffers to allocate at once.
Base class for many of the effects in Audacity.
bool ProcessInitialize(EffectSettings &settings, double sampleRate, ChannelNames chanMap=nullptr) override
virtual size_t ProcessBlock(EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen)=0
Called for destructive effect computation.
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
BuiltinEffectsModule::Registration< FadeIn > fadeIn
Externalized state of a plug-in.