2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
Echo.h
|
|
|
|
|
|
|
|
Dominic Mazzoni
|
|
|
|
Vaughan Johnson (dialog)
|
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef __AUDACITY_EFFECT_ECHO__
|
|
|
|
#define __AUDACITY_EFFECT_ECHO__
|
|
|
|
|
|
|
|
class wxString;
|
|
|
|
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
|
|
|
|
#include <wx/intl.h>
|
|
|
|
|
|
|
|
#include "Effect.h"
|
|
|
|
|
|
|
|
class wxStaticText;
|
|
|
|
|
|
|
|
class WaveTrack;
|
|
|
|
|
|
|
|
class EffectEcho:public Effect {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
EffectEcho();
|
|
|
|
|
|
|
|
virtual wxString GetEffectName() {
|
2014-12-15 21:54:23 +00:00
|
|
|
return wxString(wxTRANSLATE("Echo..."));
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual std::set<wxString> GetEffectCategories() {
|
|
|
|
std::set<wxString> result;
|
|
|
|
result.insert(wxT("http://lv2plug.in/ns/lv2core#DelayPlugin"));
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual wxString GetEffectIdentifier() {
|
|
|
|
return wxString(wxT("Echo"));
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual wxString GetEffectAction() {
|
|
|
|
return wxString(_("Performing Echo"));
|
|
|
|
}
|
2014-06-03 20:30:19 +00:00
|
|
|
|
|
|
|
// Useful only after PromptUser values have been set.
|
|
|
|
virtual wxString GetEffectDescription();
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
virtual bool PromptUser();
|
|
|
|
virtual bool TransferParameters( Shuttle & shuttle );
|
2014-06-03 20:30:19 +00:00
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
virtual bool Process();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool ProcessOne(int count, WaveTrack * t,
|
|
|
|
sampleCount start, sampleCount len);
|
2014-06-03 20:30:19 +00:00
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
float delay;
|
|
|
|
float decay;
|
|
|
|
|
|
|
|
friend class EchoDialog;
|
|
|
|
};
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// EchoDialog
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class EchoDialog:public EffectDialog {
|
|
|
|
public:
|
|
|
|
EchoDialog(EffectEcho * effect, wxWindow * parent);
|
|
|
|
|
|
|
|
void PopulateOrExchange(ShuttleGui & S);
|
|
|
|
bool TransferDataToWindow();
|
|
|
|
bool TransferDataFromWindow();
|
|
|
|
|
|
|
|
private:
|
2013-02-23 04:33:20 +00:00
|
|
|
// handlers
|
2010-01-23 19:44:49 +00:00
|
|
|
void OnPreview( wxCommandEvent &event );
|
|
|
|
|
|
|
|
private:
|
2013-02-23 04:33:20 +00:00
|
|
|
bool m_bLoopDetect;
|
|
|
|
EffectEcho * m_pEffect;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
// controls
|
2013-02-23 04:33:20 +00:00
|
|
|
wxTextCtrl * m_pTextCtrl_Delay;
|
|
|
|
wxTextCtrl * m_pTextCtrl_Decay;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
public:
|
2013-02-23 04:33:20 +00:00
|
|
|
// effect parameters
|
2010-01-23 19:44:49 +00:00
|
|
|
float delay;
|
|
|
|
float decay;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __AUDACITY_EFFECT_ECHO__
|