JUCE
|
This class contains some helpful static methods for dealing with decibel values. More...
Static Public Member Functions | |
template<typename Type > | |
static Type | decibelsToGain (const Type decibels, const Type minusInfinityDb=(Type) defaultMinusInfinitydB) |
Converts a dBFS value to its equivalent gain level. More... | |
template<typename Type > | |
static Type | gainToDecibels (const Type gain, const Type minusInfinityDb=(Type) defaultMinusInfinitydB) |
Converts a gain level into a dBFS value. More... | |
template<typename Type > | |
static String | toString (const Type decibels, const int decimalPlaces=2, const Type minusInfinityDb=(Type) defaultMinusInfinitydB) |
Converts a decibel reading to a string, with the 'dB' suffix. More... | |
This class contains some helpful static methods for dealing with decibel values.
|
static |
Converts a dBFS value to its equivalent gain level.
A gain of 1.0 = 0 dB, and lower gains map onto negative decibel values. Any decibel value lower than minusInfinityDb will return a gain of 0.
|
static |
Converts a gain level into a dBFS value.
A gain of 1.0 = 0 dB, and lower gains map onto negative decibel values. If the gain is 0 (or negative), then the method will return the value provided as minusInfinityDb.
References jmax().
|
static |
Converts a decibel reading to a string, with the 'dB' suffix.
If the decibel value is lower than minusInfinityDb, the return value will be "-INF dB".
References JUCE_DECLARE_NON_COPYABLE.