1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-01 08:29:27 +02:00

Bug1880: don't quantize DBL_MAX resulting in a negative value.

This commit is contained in:
Paul Licameli 2018-05-28 13:26:47 -04:00
parent 0fc4c2de7a
commit c7f97e7730

View File

@ -1180,8 +1180,10 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
// Quantize bounds to the rate of the new track.
if (c == 0) {
t0 = newTrack->LongSamplesToTime(newTrack->TimeToLongSamples(t0));
t1 = newTrack->LongSamplesToTime(newTrack->TimeToLongSamples(t1));
if (t0 < DBL_MAX)
t0 = newTrack->LongSamplesToTime(newTrack->TimeToLongSamples(t0));
if (t1 < DBL_MAX)
t1 = newTrack->LongSamplesToTime(newTrack->TimeToLongSamples(t1));
}
newTrack->SetOffset(t0);