1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 16:43:33 +02:00

PRL's fix for bug 827

This commit is contained in:
v.audacity
2015-02-19 11:08:58 +00:00
parent 59349002f6
commit 5f1ce03e32

View File

@@ -1901,8 +1901,10 @@ void WaveTrack::GetEnvelopeValues(double *buffer, int bufferLen,
// This check prevents problem cited in http://bugzilla.audacityteam.org/show_bug.cgi?id=528#c11,
// Gale's cross_fade_out project, which was already corrupted by bug 528.
// This conditional prevents the previous write past the buffer end, in clip->GetEnvelope() call.
if (nClipLen < rlen) // Never increase rlen here.
rlen = nClipLen;
// Never increase rlen here.
// PRL bug 827: rewrote it again
rlen = std::min(rlen, nClipLen);
rlen = std::min(rlen, int(floor(0.5 + (dClipEndTime - rt0) / tstep)));
}
clip->GetEnvelope()->GetValues(rbuf, rlen, rt0, tstep);
}