1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-17 00:07:54 +01:00

Another std::min, more auto & decltype, remove more casts

This commit is contained in:
Paul Licameli
2016-08-28 16:11:56 -04:00
parent e29c455967
commit 6043638e31
5 changed files with 16 additions and 18 deletions

View File

@@ -767,9 +767,8 @@ void NumericConverter::ValueToControls(double rawValue, bool nearest /* = true *
//rawValue = 4.9995f; Only for testing!
if (mType == TIME)
rawValue =
(double)((sampleCount)floor(rawValue * mSampleRate +
(nearest ? 0.5f : 0.0f)))
/ mSampleRate; // put on a sample
floor(rawValue * mSampleRate + (nearest ? 0.5f : 0.0f))
/ mSampleRate; // put on a sample
double theValue =
rawValue * mScalingFactor + .000001; // what's this .000001 for? // well, no log of 0
sampleCount t_int;