1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

Added dB - linear amplitude conversion macros.

This commit is contained in:
Steve Daulton
2015-07-24 21:59:34 +01:00
parent da060228eb
commit df8ddde874
16 changed files with 58 additions and 58 deletions

View File

@@ -152,8 +152,11 @@ void QuitAudacity();
#endif
#endif
// This macro is used widely, so declared here.
// These macros are used widely, so declared here.
#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)
// Marks strings for extraction only...must use wxGetTranslation() to translate.
#define XO(s) wxT(s)