mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-20 15:41:18 +01:00
Bug1880: don't quantize DBL_MAX resulting in a negative value.
This commit is contained in:
@@ -1180,8 +1180,10 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
|
|||||||
|
|
||||||
// Quantize bounds to the rate of the new track.
|
// Quantize bounds to the rate of the new track.
|
||||||
if (c == 0) {
|
if (c == 0) {
|
||||||
t0 = newTrack->LongSamplesToTime(newTrack->TimeToLongSamples(t0));
|
if (t0 < DBL_MAX)
|
||||||
t1 = newTrack->LongSamplesToTime(newTrack->TimeToLongSamples(t1));
|
t0 = newTrack->LongSamplesToTime(newTrack->TimeToLongSamples(t0));
|
||||||
|
if (t1 < DBL_MAX)
|
||||||
|
t1 = newTrack->LongSamplesToTime(newTrack->TimeToLongSamples(t1));
|
||||||
}
|
}
|
||||||
|
|
||||||
newTrack->SetOffset(t0);
|
newTrack->SetOffset(t0);
|
||||||
|
|||||||
Reference in New Issue
Block a user