41 template <
typename Type>
55 template <
typename Type>
59 return gain > Type() ? jmax (
minusInfinityDb,
static_cast<Type
> (std::log10 (gain)) * Type (20.0))
67 template <
typename Type>
85 template <
typename Type>
104 if (decibels >= Type())
107 if (decimalPlaces <= 0)
108 s << roundToInt (decibels);
110 s << String (decibels, decimalPlaces);
113 if (shouldIncludeSuffix)
121 enum { defaultMinusInfinitydB = -100 };
static Type gainWithLowerBound(Type gain, Type lowerBoundDb)
static Type decibelsToGain(Type decibels, Type minusInfinityDb=Type(defaultMinusInfinitydB))
static Type gainToDecibels(Type gain, Type minusInfinityDb=Type(defaultMinusInfinitydB))
static String toString(Type decibels, int decimalPlaces=2, Type minusInfinityDb=Type(defaultMinusInfinitydB), bool shouldIncludeSuffix=true, StringRef customMinusInfinityString={})
void preallocateBytes(size_t numBytesNeeded)