mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 09:01:15 +02:00
Fix for bug #927
At least I'm pretty sure this addresses all of the example Peter mentions.
This commit is contained in:
@@ -66,6 +66,7 @@ EffectAmplify::EffectAmplify()
|
||||
mRatio = powf(10.0f, mAmp / 20.0f);
|
||||
mCanClip = false;
|
||||
mPeak = 0.0f;
|
||||
mTracksAnalyzed = false;
|
||||
}
|
||||
|
||||
EffectAmplify::~EffectAmplify()
|
||||
@@ -133,6 +134,8 @@ bool EffectAmplify::SetAutomationParameters(EffectAutomationParameters & parms)
|
||||
// Effect implementation
|
||||
|
||||
bool EffectAmplify::Init()
|
||||
{
|
||||
if (!mTracksAnalyzed)
|
||||
{
|
||||
mPeak = 0.0f;
|
||||
|
||||
@@ -150,6 +153,9 @@ bool EffectAmplify::Init()
|
||||
}
|
||||
}
|
||||
|
||||
mTracksAnalyzed = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -68,6 +68,7 @@ private:
|
||||
|
||||
private:
|
||||
float mPeak;
|
||||
bool mTracksAnalyzed;
|
||||
|
||||
float mRatio;
|
||||
float mAmp;
|
||||
|
Reference in New Issue
Block a user