mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-03 17:39:25 +02:00
Bug 2031 - Equalization: presets under the Manage button do not save custom EQ curves
Further work needed, and a tidy up to bring arrays into ShuttleGui would be nice, but this gets us most of the way.
This commit is contained in:
parent
80ef424338
commit
23063511d9
@ -329,10 +329,43 @@ EffectType EffectEqualization::GetType()
|
|||||||
// EffectClientInterface implementation
|
// EffectClientInterface implementation
|
||||||
bool EffectEqualization::DefineParams( ShuttleParams & S ){
|
bool EffectEqualization::DefineParams( ShuttleParams & S ){
|
||||||
S.SHUTTLE_PARAM( mM, FilterLength );
|
S.SHUTTLE_PARAM( mM, FilterLength );
|
||||||
S.SHUTTLE_PARAM( mCurveName, CurveName);
|
//S.SHUTTLE_PARAM( mCurveName, CurveName);
|
||||||
S.SHUTTLE_PARAM( mLin, InterpLin);
|
S.SHUTTLE_PARAM( mLin, InterpLin);
|
||||||
S.SHUTTLE_ENUM_PARAM( mInterp, InterpMeth, kInterpStrings, nInterpolations );
|
S.SHUTTLE_ENUM_PARAM( mInterp, InterpMeth, kInterpStrings, nInterpolations );
|
||||||
|
|
||||||
|
// if saving the preferences...
|
||||||
|
if( dynamic_cast<ShuttleGetAutomation*>(&S))
|
||||||
|
{
|
||||||
|
int numPoints = mCurves[ 0 ].points.size();
|
||||||
|
S.Define( numPoints, wxString("nPoints"), 0, 0,200,1);
|
||||||
|
int point;
|
||||||
|
for( point = 0; point < numPoints; point++ )
|
||||||
|
{
|
||||||
|
const wxString nameFreq = wxString::Format("f%i",point);
|
||||||
|
const wxString nameVal = wxString::Format("v%i",point);
|
||||||
|
S.Define( mCurves[ 0 ].points[ point ].Freq, nameFreq, 0.0, 0.0, 0.0, 0.0 );
|
||||||
|
S.Define( mCurves[ 0 ].points[ point ].dB, nameVal, 0.0, 0.0, 0.0, 0.0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int numPoints;// = mLogEnvelope->GetNumberOfPoints();
|
||||||
|
S.Define( numPoints, wxString("nPoints"), 0, 0,200,1);
|
||||||
|
mCurves[0].points.clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < numPoints; i++)
|
||||||
|
{
|
||||||
|
const wxString nameFreq = wxString::Format("f%i",i);
|
||||||
|
const wxString nameVal = wxString::Format("v%i",i);
|
||||||
|
double f,d;
|
||||||
|
S.Define( f, nameFreq, 0.0, -10000.0, 10000.0, 0.0 );
|
||||||
|
S.Define( d, nameVal, 0.0, -10000.0, 10000.0, 0.0 );
|
||||||
|
mCurves[0].points.push_back( EQPoint( f,d ));
|
||||||
|
}
|
||||||
|
setCurve( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,9 +120,8 @@
|
|||||||
EFFECT( EQUALIZATION, EffectEqualization, (kEqLegacy) ) \
|
EFFECT( EQUALIZATION, EffectEqualization, (kEqLegacy) ) \
|
||||||
EFFECT( FADEIN, EffectFade, (true) ) \
|
EFFECT( FADEIN, EffectFade, (true) ) \
|
||||||
EFFECT( FADEOUT, EffectFade, (false) ) \
|
EFFECT( FADEOUT, EffectFade, (false) ) \
|
||||||
/* These two effects, not yet */ \
|
EFFECT( FILTERCURVE, EffectEqualization, (kEqOptionCurve) ) \
|
||||||
/*EFFECT( FILTERCURVE, EffectEqualization, (kEqOptionCurve) )*/ \
|
EFFECT( GRAPHICEQ, EffectEqualization, (kEqOptionGraphic) ) \
|
||||||
/*EFFECT( GRAPHICEQ, EffectEqualization, (kEqOptionGraphic) )*/ \
|
|
||||||
EFFECT( INVERT, EffectInvert, () ) \
|
EFFECT( INVERT, EffectInvert, () ) \
|
||||||
EFFECT( NORMALIZE, EffectNormalize, () ) \
|
EFFECT( NORMALIZE, EffectNormalize, () ) \
|
||||||
EFFECT( PHASER, EffectPhaser, () ) \
|
EFFECT( PHASER, EffectPhaser, () ) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user