openshot-audio
0.1.7
|
#include <juce_audio_basics.h>
Static Public Member Functions | |
template<typename Type > | |
static Type | decibelsToGain (const Type decibels, const Type minusInfinityDb=(Type) defaultMinusInfinitydB) |
template<typename Type > | |
static Type | gainToDecibels (const Type gain, const Type minusInfinityDb=(Type) defaultMinusInfinitydB) |
template<typename Type > | |
static String | toString (const Type decibels, const int decimalPlaces=2, const Type minusInfinityDb=(Type) defaultMinusInfinitydB) |
This class contains some helpful static methods for dealing with decibel values.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
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".