Audacity 3.2.0
LimiterEditor.cpp
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 LimiterEditor.cpp
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
11#include "LimiterEditor.h"
12#include "ShuttleGui.h"
13
14namespace
15{
17{
19 : mParameter { parameter }
20 {
21 }
22
23 double Min() const override
24 {
25 return mParameter.min / mParameter.scale;
26 }
27
28 double Max() const override
29 {
30 return mParameter.max / mParameter.scale;
31 }
32
33 double SliderMin() const override
34 {
35 return mParameter.min;
36 }
37
38 double SliderMax() const override
39 {
40 return mParameter.max;
41 }
42
43 double TextToSlider() const override
44 {
45 return mParameter.scale;
46 }
47
49};
50} // namespace
51
53 wxWindow* parent, CompressorInstance& instance, bool isRealtime,
54 const EffectUIServices& services, EffectSettingsAccess& access,
56 : DynamicRangeProcessorEditor { parent, instance, isRealtime, services,
57 access }
58 , mSettings { std::move(settings) }
59{
61 std::make_shared<ParameterWrapper>(thresholdDb),
64 std::make_shared<ParameterWrapper>(makeupTargetDb),
67 std::make_shared<ParameterWrapper>(kneeWidthDb),
70 std::make_shared<ParameterWrapper>(lookaheadMs),
73 std::make_shared<ParameterWrapper>(releaseMs),
75}
static const DynamicRangeProcessorParameterAttributes limiterThresholdDbAttributes
static const DynamicRangeProcessorParameterAttributes limiterMakeupTargetDbAttributes
static const DynamicRangeProcessorParameterAttributes lookaheadMsAttributes
static const DynamicRangeProcessorParameterAttributes kneeWidthDbAttributes
static const DynamicRangeProcessorParameterAttributes releaseMsAttributes
static Settings & settings()
Definition: TrackInfo.cpp:51
void Initialize(std::vector< ExtendedCompressorParameter > parameters)
static constexpr LimiterParameter releaseMs
Definition: LimiterEditor.h:74
LimiterEditor(wxWindow *parent, CompressorInstance &instance, bool isRealtime, const EffectUIServices &services, EffectSettingsAccess &access, LimiterSettings settings)
LimiterSettings mSettings
Definition: LimiterEditor.h:35
static constexpr LimiterParameter makeupTargetDb
Definition: LimiterEditor.h:50
static constexpr LimiterParameter lookaheadMs
Definition: LimiterEditor.h:68
static constexpr LimiterParameter thresholdDb
Definition: LimiterEditor.h:41
static constexpr LimiterParameter kneeWidthDb
Definition: LimiterEditor.h:59
STL namespace.
ParameterWrapper(const LimiterParameter &parameter)