1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +02:00

Bug 828 (partial) - Don't divide by zero in Contrast dialog

This commit is contained in:
Paul-Licameli 2015-04-09 19:21:39 -04:00
parent a583fafbb7
commit e26ab98e0e

View File

@ -1734,7 +1734,7 @@ bool WaveTrack::GetRMS(float *rms, double t0, double t1)
}
}
}
*rms = sqrt(sumsq/length);
*rms = length > 0.0 ? sqrt(sumsq / length) : 0.0;
return result;
}