1 /**********************************************************************
2 
3   Audacity: A Digital Audio Editor
4 
5   Echo.h
6 
7   Dominic Mazzoni
8   Vaughan Johnson (dialog)
9 
10 **********************************************************************/
11 
12 #ifndef __AUDACITY_EFFECT_ECHO__
13 #define __AUDACITY_EFFECT_ECHO__
14 
15 #include "Effect.h"
16 
17 class ShuttleGui;
18 
19 class EffectEcho final : public Effect
20 {
21 public:
22    static const ComponentInterfaceSymbol Symbol;
23 
24    EffectEcho();
25    virtual ~EffectEcho();
26 
27    // ComponentInterface implementation
28 
29    ComponentInterfaceSymbol GetSymbol() override;
30    TranslatableString GetDescription() override;
31    ManualPageID ManualPage() override;
32 
33    // EffectDefinitionInterface implementation
34 
35    EffectType GetType() override;
36 
37    // EffectClientInterface implementation
38 
39    unsigned GetAudioInCount() override;
40    unsigned GetAudioOutCount() override;
41    bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap = NULL) override;
42    bool ProcessFinalize() override;
43    size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override;
44    bool DefineParams( ShuttleParams & S ) override;
45    bool GetAutomationParameters(CommandParameters & parms) override;
46    bool SetAutomationParameters(CommandParameters & parms) override;
47 
48    // Effect implementation
49    void PopulateOrExchange(ShuttleGui & S) override;
50    bool TransferDataToWindow() override;
51    bool TransferDataFromWindow() override;
52 
53 private:
54    // EffectEcho implementation
55 
56 private:
57    double delay;
58    double decay;
59    Floats history;
60    size_t histPos;
61    size_t histLen;
62 };
63 
64 #endif // __AUDACITY_EFFECT_ECHO__
65