Skip to content

Commit

Permalink
Revert "Bug 1686 - Equalization effects ignore and remove any amplitu…
Browse files Browse the repository at this point in the history
…de envelope"

This reverts commit 58adb94.
  • Loading branch information
crsib committed Aug 18, 2021
1 parent 8b0d074 commit 076c694
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/effects/Equalization.cpp
Expand Up @@ -1383,8 +1383,6 @@ bool EffectEqualization::ProcessOne(int count, WaveTrack * t,
output->Append((samplePtr)buffer.get(), floatSample, mM - 1);
output->Flush();

std::vector<EnvPoint> envPoints;

// now move the appropriate bit of the output back to the track
// (this could be enhanced in the future to use the tails)
double offsetT0 = t->LongSamplesToTime(offset);
Expand Down Expand Up @@ -1424,14 +1422,7 @@ bool EffectEqualization::ProcessOne(int count, WaveTrack * t,

//save them
clipStartEndTimes.push_back(std::pair<double,double>(clipStartT,clipEndT));

// Save the envelope points
const auto &env = *clip->GetEnvelope();
for (size_t i = 0, numPoints = env.GetNumberOfPoints(); i < numPoints; ++i) {
envPoints.push_back(env[i]);
}
}

//now go thru and replace the old clips with NEW
for(unsigned int i = 0; i < clipStartEndTimes.size(); i++)
{
Expand All @@ -1448,12 +1439,6 @@ bool EffectEqualization::ProcessOne(int count, WaveTrack * t,
clipRealStartEndTimes[i].second >= startT+lenT) )
t->Join(clipRealStartEndTimes[i].first,clipRealStartEndTimes[i].second);
}

// Restore the envelope points
for (auto point : envPoints) {
WaveClip *clip = t->GetClipAtTime(point.GetT());
clip->GetEnvelope()->Insert(point.GetT(), point.GetVal());
}
}

return bLoopSuccess;
Expand Down

0 comments on commit 076c694

Please sign in to comment.