1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +02:00
This commit is contained in:
Paul Licameli 2015-08-27 16:51:08 -04:00
parent 80d7ed36f0
commit 65b94d1fa5

View File

@ -780,7 +780,7 @@ void TrackArtist::UpdateVRuler(Track *t, wxRect & rect)
const float extreme = LINEAR_TO_DB(2);
// recover dB value of max
const float dB = std::min(extreme, (fabs(max) * lastdBRange - lastdBRange));
const float dB = std::min(extreme, (float(fabs(max)) * lastdBRange - lastdBRange));
// find new scale position, but old max may get trimmed if the db limit rises
// Don't trim it to zero though, but leave max and limit distinct
newMax = sign * std::max(ZOOMLIMIT, (dBRange + dB) / dBRange);