1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-03 14:13:11 +02:00

Bug999: top bin of spectrogram display

This commit is contained in:
unknown 2015-06-01 16:53:39 -04:00
parent d74e995024
commit 5f71e334dc

View File

@ -1843,8 +1843,8 @@ static inline float findValue
half;
// Maximum method, and no apportionment of any single bins over multiple pixel rows
// See Bug971
int bin = floor(0.5 + bin0);
const int limitBin = floor(0.5 + bin1);
int bin = std::min(half - 1, int(floor(0.5 + bin0)));
const int limitBin = std::min(half, int(floor(0.5 + bin1)));
value = spectrum[bin];
while (++bin < limitBin)
value = std::max(value, spectrum[bin]);