1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-24 23:33:50 +02: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

@@ -162,7 +162,7 @@ void QuitAudacity();
#endif
// These macros are used widely, so declared here.
#define QUANTIZED_TIME(time, rate) (((double)((sampleCount)floor(((double)(time) * (rate)) + 0.5))) / (rate))
#define QUANTIZED_TIME(time, rate) (floor(((double)(time) * (rate)) + 0.5) / (rate))
// dB - linear amplitude convesions
#define DB_TO_LINEAR(x) (pow(10.0, (x) / 20.0))
#define LINEAR_TO_DB(x) (20.0 * log10(x))