Xeno-rat
Loading...
Searching...
No Matches
NAudio.Utils.Decibels Class Reference

A util class for conversions. More...

Collaboration diagram for NAudio.Utils.Decibels:

Static Public Member Functions

static double LinearToDecibels (double lin)
 Converts a linear value to decibels.
 
static double DecibelsToLinear (double dB)
 Converts a decibel value to its linear equivalent.
 

Static Private Attributes

const double LOG_2_DB = 8.6858896380650365530225783783321
 
const double DB_2_LOG = 0.11512925464970228420089957273422
 

Detailed Description

A util class for conversions.

Member Function Documentation

◆ DecibelsToLinear()

static double NAudio.Utils.Decibels.DecibelsToLinear ( double dB)
inlinestatic

Converts a decibel value to its linear equivalent.

Parameters
dBThe decibel value to be converted.
Returns
The linear equivalent of the input decibel value.

This method uses the formula: linear = exp(dB * 0.11512925464970229).

Here is the caller graph for this function:

◆ LinearToDecibels()

static double NAudio.Utils.Decibels.LinearToDecibels ( double lin)
inlinestatic

Converts a linear value to decibels.

Parameters
linThe linear value to be converted.
Returns
The value of lin converted to decibels.

This method calculates the logarithm of the input linear value and multiplies it by the conversion factor to obtain the value in decibels.

Here is the caller graph for this function:

Member Data Documentation

◆ DB_2_LOG

const double NAudio.Utils.Decibels.DB_2_LOG = 0.11512925464970228420089957273422
staticprivate

◆ LOG_2_DB

const double NAudio.Utils.Decibels.LOG_2_DB = 8.6858896380650365530225783783321
staticprivate

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