From 6a7da21decf8c5ef3ca859d79c6e8c8616d98793 Mon Sep 17 00:00:00 2001 From: "RichardAsh1981@gmail.com" Date: Mon, 23 Sep 2013 20:16:02 +0000 Subject: [PATCH] remove various unused #defines and bits of code, patch by Campbell Barton --- src/AudacityApp.cpp | 2 -- src/AudioIO.cpp | 6 ++++-- src/Menus.cpp | 6 ------ src/TimerRecordDialog.cpp | 1 - src/TrackArtist.cpp | 3 --- src/UploadDialog.cpp | 10 ---------- src/effects/AutoDuck.cpp | 10 ---------- src/effects/Noise.cpp | 5 ----- src/effects/TruncSilence.cpp | 1 - src/export/ExportPCM.cpp | 1 - src/prefs/BatchPrefs.cpp | 11 ----------- 11 files changed, 4 insertions(+), 52 deletions(-) diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 417c69f9f..8c372973c 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -563,8 +563,6 @@ class GnomeShutdown GnomeClient *mClient; }; -GnomeShutdown GnomeShutdownInstance; - #endif #if defined(__WXMSW__) diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp index e6b2045e1..f00911c99 100644 --- a/src/AudioIO.cpp +++ b/src/AudioIO.cpp @@ -316,8 +316,10 @@ writing audio. #include "NoteTrack.h" #endif -#define LOWER_BOUND 0.0 -#define UPPER_BOUND 1.0 +#ifdef AUTOMATED_INPUT_LEVEL_ADJUSTMENT + #define LOWER_BOUND 0.0 + #define UPPER_BOUND 1.0 +#endif using std::max; using std::min; diff --git a/src/Menus.cpp b/src/Menus.cpp index 6088eb414..9811c1ce7 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -5587,12 +5587,6 @@ void AudacityProject::OnEditLabels() } } -// #define PRESET_FORMAT 20050501 -#define PRESET_FORMAT 20050428 -// #define PRESET_COUNT 16 -#define PRESET_COUNT 14 - - void AudacityProject::OnApplyChain() { BatchProcessDialog dlg(this); diff --git a/src/TimerRecordDialog.cpp b/src/TimerRecordDialog.cpp index 6f81fc3aa..5ad4d7b9e 100644 --- a/src/TimerRecordDialog.cpp +++ b/src/TimerRecordDialog.cpp @@ -34,7 +34,6 @@ #include "Internat.h" #include "Prefs.h" -#define MAX_PROG 1000 #define TIMER_ID 7000 enum { // control IDs diff --git a/src/TrackArtist.cpp b/src/TrackArtist.cpp index 696732c6b..4c10d5977 100644 --- a/src/TrackArtist.cpp +++ b/src/TrackArtist.cpp @@ -2366,7 +2366,6 @@ const char *LookupAtomAttribute(Alg_note_ptr note, Alg_attribute attr, char *def } return def; } -#endif // USE_MIDI #define TIME_TO_X(t) (r.x + (int) (((t) - h) * pps)) #define X_TO_TIME(xx) (((xx) - r.x) / pps + h) @@ -2388,8 +2387,6 @@ const char *LookupAtomAttribute(Alg_note_ptr note, Alg_attribute attr, char *def //#define PITCH_TO_Y(p) (r.y + r.height - int(pitchht * ((p) + 0.5 - pitch0) + 0.5)) -#ifdef USE_MIDI - /* int PitchToY(double p, int bottom) { diff --git a/src/UploadDialog.cpp b/src/UploadDialog.cpp index 3d80bcfcb..e3eda6cc8 100644 --- a/src/UploadDialog.cpp +++ b/src/UploadDialog.cpp @@ -54,16 +54,6 @@ //#include "../images/AudacityLogo.xpm" //#include "../images/UploadImages.h" -#ifdef __WXMSW__ -# define DLOG_HEIGHT 430 -#else -# if defined(__WXMAC__) && ((wxMAJOR_VERSION == 2) && (wxMINOR_VERSION >= 5)) -# define DLOG_HEIGHT 430 -# else -# define DLOG_HEIGHT 400 -# endif -#endif - // Icon images ///\todo get these XPMs out of here and into Theme. diff --git a/src/effects/AutoDuck.cpp b/src/effects/AutoDuck.cpp index 573add763..031c9deb5 100644 --- a/src/effects/AutoDuck.cpp +++ b/src/effects/AutoDuck.cpp @@ -939,16 +939,6 @@ void EffectAutoDuckPanel::OnMotion(wxMouseEvent &evt) if (mControlPointMoveActivated) { - int dist; - - if (mCurrentControlPoint == duckAmount) - dist = abs(evt.GetY() - - mMoveStartControlPoints[mCurrentControlPoint].y); - else - dist = abs(evt.GetX() - - mMoveStartControlPoints[mCurrentControlPoint].x); - // TODO: Get rid of unused 'dist' var within this scope? - float newValue; switch (mCurrentControlPoint) diff --git a/src/effects/Noise.cpp b/src/effects/Noise.cpp index c3c51ff27..4a353b932 100644 --- a/src/effects/Noise.cpp +++ b/src/effects/Noise.cpp @@ -171,11 +171,6 @@ void EffectNoise::Success() // NoiseDialog //---------------------------------------------------------------------------- -#define FREQ_MIN 1 -#define FREQ_MAX 20000 -#define AMP_MIN 0 -#define AMP_MAX 1 - BEGIN_EVENT_TABLE(NoiseDialog, EffectDialog) EVT_COMMAND(wxID_ANY, EVT_TIMETEXTCTRL_UPDATED, NoiseDialog::OnTimeCtrlUpdate) END_EVENT_TABLE() diff --git a/src/effects/TruncSilence.cpp b/src/effects/TruncSilence.cpp index e91d1423f..3d20643e8 100644 --- a/src/effects/TruncSilence.cpp +++ b/src/effects/TruncSilence.cpp @@ -509,7 +509,6 @@ void EffectTruncSilence::BlendFrames(float* buffer, int blendFrameCount, int lef #define ID_SHORTEST_SILENCE_TEXT 7000 #define ID_LONGEST_SILENCE_TEXT 7001 #define ID_COMPRESS_FACTOR 7002 -#define ID_DB_SILENCE_THRESHOLD_CHOICE 7003 BEGIN_EVENT_TABLE(TruncSilenceDialog, EffectDialog) EVT_BUTTON(ID_EFFECT_PREVIEW, TruncSilenceDialog::OnPreview) diff --git a/src/export/ExportPCM.cpp b/src/export/ExportPCM.cpp index 96376f291..5780a5624 100644 --- a/src/export/ExportPCM.cpp +++ b/src/export/ExportPCM.cpp @@ -75,7 +75,6 @@ static void WriteExportFormatPref(int format) // ExportPCMOptions Class //---------------------------------------------------------------------------- -#define ID_FORMAT_CHOICE 7101 #define ID_HEADER_CHOICE 7102 #define ID_ENCODING_CHOICE 7103 diff --git a/src/prefs/BatchPrefs.cpp b/src/prefs/BatchPrefs.cpp index 8f390ce3b..9901060be 100644 --- a/src/prefs/BatchPrefs.cpp +++ b/src/prefs/BatchPrefs.cpp @@ -30,17 +30,6 @@ #include "../Menus.h" #include "../toolbars/ToolManager.h" -#define ChainsListID 7005 -#define AddButtonID 7006 -#define RemoveButtonID 7007 -#define CommandsListID 7008 -#define ImportButtonID 7009 -#define ExportButtonID 7010 -#define DefaultsButtonID 7011 -#define UpButtonID 7012 -#define DownButtonID 7013 -#define RenameButtonID 7014 - BEGIN_EVENT_TABLE(BatchPrefs, wxPanel) END_EVENT_TABLE()