openshot-audio  0.1.2
Static Public Member Functions | List of all members
juce::Decibels Class Reference

#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)
 

Detailed Description

This class contains some helpful static methods for dealing with decibel values.

Member Function Documentation

◆ decibelsToGain()

template<typename Type >
static Type juce::Decibels::decibelsToGain ( const Type  decibels,
const Type  minusInfinityDb = (Type) defaultMinusInfinitydB 
)
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.

◆ gainToDecibels()

template<typename Type >
static Type juce::Decibels::gainToDecibels ( const Type  gain,
const Type  minusInfinityDb = (Type) defaultMinusInfinitydB 
)
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.

◆ toString()

template<typename Type >
static String juce::Decibels::toString ( const Type  decibels,
const int  decimalPlaces = 2,
const Type  minusInfinityDb = (Type) defaultMinusInfinitydB 
)
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".


The documentation for this class was generated from the following file: