mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 16:48:44 +02:00
Fix the previous fix! ... in copying of wave clip display caches.
This commit is contained in:
parent
a41eb4422c
commit
921b769b52
@ -569,9 +569,9 @@ bool WaveClip::GetWaveDisplay(WaveDisplay &display, double t0,
|
||||
// possibly out of bounds.
|
||||
// For what range of pixels can data be copied?
|
||||
copyBegin = std::min<size_t>(numPixels, std::max(0, -oldX0));
|
||||
copyEnd = std::min<size_t>(numPixels,
|
||||
std::max(0, (int)oldCache->len - std::max(0, oldX0))
|
||||
);
|
||||
copyEnd = std::min<size_t>(numPixels, std::max(0,
|
||||
(int)oldCache->len - oldX0
|
||||
));
|
||||
}
|
||||
if (!(copyEnd > copyBegin))
|
||||
oldCache.reset(0);
|
||||
@ -1172,9 +1172,9 @@ bool WaveClip::GetSpectrogram(WaveTrackCache &waveTrackCache,
|
||||
// possibly out of bounds.
|
||||
// For what range of pixels can data be copied?
|
||||
copyBegin = std::min((int)numPixels, std::max(0, -oldX0));
|
||||
copyEnd = std::min((int)numPixels,
|
||||
(int)oldCache->len - std::max(0, oldX0)
|
||||
);
|
||||
copyEnd = std::min((int)numPixels, std::max(0,
|
||||
(int)oldCache->len - oldX0
|
||||
));
|
||||
}
|
||||
|
||||
if (!(copyEnd > copyBegin))
|
||||
|
Loading…
x
Reference in New Issue
Block a user