mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-19 17:40:51 +02:00
This commit is contained in:
parent
90858b2e99
commit
a7a6c2b557
@ -1105,7 +1105,7 @@ void Envelope::GetValues(double *buffer, int bufferLen,
|
|||||||
t += tstep;
|
t += tstep;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// IF after after THEN last value
|
// IF after envelope THEN last value
|
||||||
if (t >= mEnv[len - 1]->t) {
|
if (t >= mEnv[len - 1]->t) {
|
||||||
buffer[b] = mEnv[len - 1]->val;
|
buffer[b] = mEnv[len - 1]->val;
|
||||||
t += tstep;
|
t += tstep;
|
||||||
|
@ -1758,9 +1758,16 @@ void WaveTrack::GetEnvelopeValues(double *buffer, int bufferLen,
|
|||||||
rt0 = clip->GetStartTime();
|
rt0 = clip->GetStartTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rt0+rlen*tstep > clip->GetEndTime())
|
if (rt0 + rlen*tstep > clip->GetEndTime())
|
||||||
{
|
{
|
||||||
rlen = clip->GetEndSample() - clip->GetStartSample();
|
int nClipLen = clip->GetEndSample() - clip->GetStartSample();
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
//vvvvv Should really be checked earlier, in reading the project, but that needs much more debugging, and
|
||||||
|
// this prevents the previous write past the buffer end, in clip->GetEnvelope() call.
|
||||||
|
if (nClipLen < rlen)
|
||||||
|
rlen = nClipLen;
|
||||||
}
|
}
|
||||||
clip->GetEnvelope()->GetValues(rbuf, rlen, rt0, tstep);
|
clip->GetEnvelope()->GetValues(rbuf, rlen, rt0, tstep);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user