Bug 1097: Fix unsafe macro definitions which caused display bugs

This commit is contained in:
Paul Licameli 2015-07-26 00:05:27 -04:00
parent 7b4cc4f12a
commit cdc268f681
1 changed files with 3 additions and 3 deletions

View File

@ -153,10 +153,10 @@ 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) (((double)((sampleCount)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)
#define DB_TO_LINEAR(x) (pow(10.0, (x) / 20.0))
#define LINEAR_TO_DB(x) (20.0 * log10(x))
// Marks strings for extraction only...must use wxGetTranslation() to translate.
#define XO(s) wxT(s)