Audacity  3.0.3
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 
14 #include "Effect.h"
15 
16 class EffectFade : public Effect
17 {
18 public:
19  EffectFade(bool fadeIn = false);
20  virtual ~EffectFade();
21 
22  // ComponentInterface implementation
23 
26 
27  // EffectDefinitionInterface implementation
28 
29  EffectType GetType() override;
30  bool IsInteractive() override;
31 
32  // EffectClientInterface implementation
33 
34  unsigned GetAudioInCount() override;
35  unsigned GetAudioOutCount() override;
36  bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap = NULL) override;
37  size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override;
38 
39 private:
40  // EffectFade implementation
41 
42  bool mFadeIn;
44 };
45 
46 class EffectFadeIn final : public EffectFade
47 {
48 public:
50 
51  EffectFadeIn() : EffectFade{ true } {}
52 };
53 
54 
55 class EffectFadeOut final : public EffectFade
56 {
57 public:
59 
60  EffectFadeOut() : EffectFade{ false } {}
61 };
62 
63 #endif
EffectFadeOut::EffectFadeOut
EffectFadeOut()
Definition: Fade.h:60
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
EffectFade::ProcessInitialize
bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap=NULL) override
Definition: Fade.cpp:82
EffectFadeIn::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: Fade.h:49
EffectFade::mSample
sampleCount mSample
Definition: Fade.h:43
EffectFadeIn::EffectFadeIn
EffectFadeIn()
Definition: Fade.h:51
EffectFade::GetAudioOutCount
unsigned GetAudioOutCount() override
Definition: Fade.cpp:77
Effect.h
EffectFade::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: Fade.cpp:44
Effect
Base class for many of the effects in Audacity.
Definition: Effect.h:72
EffectFadeOut::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: Fade.h:58
EffectFade
An Effect that reduces the volume to zero over achosen interval.
Definition: Fade.h:17
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
EffectFadeOut
Definition: Fade.h:56
EffectFade::IsInteractive
bool IsInteractive() override
Definition: Fade.cpp:65
EffectFade::GetType
EffectType GetType() override
Definition: Fade.cpp:60
ChannelNames
enum ChannelName * ChannelNames
EffectFade::~EffectFade
virtual ~EffectFade()
Definition: Fade.cpp:38
EffectFade::ProcessBlock
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: Fade.cpp:89
EffectFade::EffectFade
EffectFade(bool fadeIn=false)
Definition: Fade.cpp:33
EffectFade::GetDescription
TranslatableString GetDescription() override
Definition: Fade.cpp:51
sampleCount
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:18
EffectType
EffectType
Definition: EffectInterface.h:55
EffectFade::mFadeIn
bool mFadeIn
Definition: Fade.h:42
EffectFade::GetAudioInCount
unsigned GetAudioInCount() override
Definition: Fade.cpp:72
EffectFadeIn
Definition: Fade.h:47