Audacity 3.2.0
EqualizationParameters.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 EqualizationParameters.cpp
6
7 Mitch Golden
8 Vaughan Johnson (Preview)
9
10 Paul Licameli split from Equalization.cpp
11
12***********************************************************************/
14#include "ConfigInterface.h"
15
17{
18 // These are acceptable dual purpose internal/visible names
19
20 /* i18n-hint: Technical term for a kind of curve.*/
21 { XO("B-spline") },
22 { XO("Cosine") },
23 { XO("Cubic") }
24};
25
28 : mSettingsManager { manager }
29 , mCurveName { CurveName.def }
30 , mM { FilterLength.def }
31 , mInterp { InterpMeth.def }
32 , mLin { InterpLin.def }
33{
42}
43
45{
50
51 if( options == kEqOptionCurve)
52 mDrawMode = true;
53 if( options == kEqOptionGraphic)
54 mDrawMode = false;
55}
56
58const
59{
60 // TODO: just visit these effect settings the default way
62 CurrentSettingsGroup(), wxT("dBMin"), mdBMin);
64 CurrentSettingsGroup(), wxT("dBMax"), mdBMax);
66 CurrentSettingsGroup(), wxT("DrawMode"), mDrawMode);
68 CurrentSettingsGroup(), wxT("DrawGrid"), mDrawGrid);
69}
70
72{
73 // If sliders show (!mDrawMode), always use the log envelope
74 return mDrawMode && mLin;
75}
wxT("CloseDown"))
const RegistryPath & CurrentSettingsGroup()
Component of a configuration key path, for last-used destructive settings.
const int kEqOptionCurve
const int kEqOptionGraphic
XO("Cut/Copy/Paste")
static const AttachedProjectObjects::RegisteredFactory manager
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
EffectSettingsManager is an EffectDefinitionInterface that adds a factory function for EffectSettings...
bool SetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &value)
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)
const Type def
Default value.
const EffectSettingsManager & mSettingsManager
EqualizationParameters(const EffectSettingsManager &manager)
static constexpr EffectParameter dBMax
static constexpr EffectParameter dBMin
static constexpr EffectParameter DrawGrid
static const EnumValueSymbol kInterpStrings[nInterpolations]
static constexpr EffectParameter DrawMode