mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +02:00
bug 528 (http://bugzilla.audacityteam.org/show_bug.cgi?id=528, P2)
modified version of Martyn's patch
This commit is contained in:
parent
bbee41ab67
commit
002b25991d
@ -1752,15 +1752,15 @@ void WaveTrack::GetEnvelopeValues(double *buffer, int bufferLen,
|
||||
|
||||
if (rt0 < clip->GetStartTime())
|
||||
{
|
||||
int dx = (int) floor((clip->GetStartTime() - rt0) / tstep + 0.5);
|
||||
rbuf += dx;
|
||||
rlen -= dx;
|
||||
sampleCount start = clip->GetStartSample();
|
||||
rbuf += start;
|
||||
rlen -= start;
|
||||
rt0 = clip->GetStartTime();
|
||||
}
|
||||
|
||||
if (rt0+rlen*tstep > clip->GetEndTime())
|
||||
{
|
||||
rlen = (int) ((clip->GetEndTime()-rt0) / tstep);
|
||||
rlen = clip->GetEndSample() - clip->GetStartSample();
|
||||
}
|
||||
clip->GetEnvelope()->GetValues(rbuf, rlen, rt0, tstep);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user