1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-19 17:11:12 +02:00

Fix Echo based on Peter's feedback

This commit is contained in:
Leland Lucius
2015-04-22 13:04:06 -05:00
parent b22f6b59d2
commit ae860ff967

View File

@@ -31,9 +31,9 @@
// Define keys, defaults, minimums, and maximums for the effect parameters
//
// Name Type Key Def Min Max Scale
Param( Delay, float, XO("Delay"), 1.0, 0.0, FLT_MAX, 1 );
Param( Decay, float, XO("Decay"), 0.5, 1.0, 1.0, 1 );
// Name Type Key Def Min Max Scale
Param( Delay, float, XO("Delay"), 1.0, 0.001, FLT_MAX, 1 );
Param( Decay, float, XO("Decay"), 0.5, 0.0, FLT_MAX, 1 );
EffectEcho::EffectEcho()
{
@@ -78,6 +78,11 @@ int EffectEcho::GetAudioOutCount()
bool EffectEcho::ProcessInitialize(sampleCount WXUNUSED(totalLen), ChannelNames WXUNUSED(chanMap))
{
if (delay == 0.0)
{
return false;
}
histPos = 0;
histLen = (sampleCount) (mSampleRate * delay);
history = new float[histLen];