From 6adb2abc98618ffaee43841bf229ec5b14e40ed6 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 2 Jul 2019 12:28:25 -0400 Subject: [PATCH] Keep EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT compilable... ... while not reintroducing bad dependencies, which explains the movement of the definition of some constants --- src/AudioIO.h | 7 ------- src/prefs/RecordingPrefs.h | 10 ++++++++++ src/widgets/Meter.h | 4 ++-- src/widgets/MeterPanelBase.h | 3 +++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/AudioIO.h b/src/AudioIO.h index c75ee147c..ce4302cc5 100644 --- a/src/AudioIO.h +++ b/src/AudioIO.h @@ -65,13 +65,6 @@ bool ValidateDeviceNames(); #define MAX_MIDI_BUFFER_SIZE 5000 #define DEFAULT_SYNTH_LATENCY 5 -#ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT - #define AILA_DEF_TARGET_PEAK 92 - #define AILA_DEF_DELTA_PEAK 2 - #define AILA_DEF_ANALYSIS_TIME 1000 - #define AILA_DEF_NUMBER_ANALYSIS 5 -#endif - wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, EVT_AUDIOIO_PLAYBACK, wxCommandEvent); wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, diff --git a/src/prefs/RecordingPrefs.h b/src/prefs/RecordingPrefs.h index 1d3af90d4..29fe793c0 100644 --- a/src/prefs/RecordingPrefs.h +++ b/src/prefs/RecordingPrefs.h @@ -12,6 +12,9 @@ #ifndef __AUDACITY_RECORDING_PREFS__ #define __AUDACITY_RECORDING_PREFS__ +#include "../Audacity.h" +#include "../Experimental.h" + #include #include "PrefsPanel.h" @@ -19,6 +22,13 @@ class wxTextCtrl; class ShuttleGui; +#ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT + #define AILA_DEF_TARGET_PEAK 92 + #define AILA_DEF_DELTA_PEAK 2 + #define AILA_DEF_ANALYSIS_TIME 1000 + #define AILA_DEF_NUMBER_ANALYSIS 5 +#endif + #define RECORDING_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Recording") } #define DEFAULT_LATENCY_DURATION 100.0 diff --git a/src/widgets/Meter.h b/src/widgets/Meter.h index c000ac8ce..4f55cd0b7 100644 --- a/src/widgets/Meter.h +++ b/src/widgets/Meter.h @@ -173,7 +173,7 @@ class MeterPanel final : public MeterPanelBase, private PrefsListener float GetMaxPeak() const override; - bool IsClipping() const; + bool IsClipping() const override; void StartMonitoring(); void StopMonitoring(); @@ -183,7 +183,7 @@ class MeterPanel final : public MeterPanelBase, private PrefsListener State SaveState(); void RestoreState(const State &state); - int GetDBRange() const { return mDB ? mDBRange : -1; } + int GetDBRange() const override { return mDB ? mDBRange : -1; } private: void UpdatePrefs() override; diff --git a/src/widgets/MeterPanelBase.h b/src/widgets/MeterPanelBase.h index 5cdee6728..fd555045e 100644 --- a/src/widgets/MeterPanelBase.h +++ b/src/widgets/MeterPanelBase.h @@ -27,6 +27,9 @@ public: virtual bool IsMeterDisabled() const = 0; virtual float GetMaxPeak() const = 0; + virtual bool IsClipping() const = 0; + virtual int GetDBRange() const = 0; + bool AcceptsFocus() const override { return s_AcceptsFocus; } bool AcceptsFocusFromKeyboard() const override { return true; }