mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-23 15:50:05 +02:00
Fix mistake in partial reuse of caches for drawing wave & spectrum...
... But this mistake probably had no visible consequences, if total width in pixes was unchanged.
This commit is contained in:
parent
2b8ba09c4e
commit
a41eb4422c
@ -570,8 +570,7 @@ bool WaveClip::GetWaveDisplay(WaveDisplay &display, double t0,
|
||||
// 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)copyBegin + (int)oldCache->len - std::max(0, oldX0))
|
||||
std::max(0, (int)oldCache->len - std::max(0, oldX0))
|
||||
);
|
||||
}
|
||||
if (!(copyEnd > copyBegin))
|
||||
@ -1174,7 +1173,7 @@ bool WaveClip::GetSpectrogram(WaveTrackCache &waveTrackCache,
|
||||
// For what range of pixels can data be copied?
|
||||
copyBegin = std::min((int)numPixels, std::max(0, -oldX0));
|
||||
copyEnd = std::min((int)numPixels,
|
||||
copyBegin + (int)oldCache->len - std::max(0, oldX0)
|
||||
(int)oldCache->len - std::max(0, oldX0)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user