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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user