XDSP
Audio signal processing and synthesis library.
|
Decibel conversion functions. More...
Functions | |
double | to_linear (double db) |
Converts decibel (relative to 1.0) value to linear gain factor. | |
float | to_linear (float db) |
Converts decibel (relative to 1.0) value to linear gain factor. | |
double | to_linear_off (double db, double threshold) |
Converts decibel (relative to 1.0) value to linear gain factor. If value is below given threshold, this function returns 0. | |
float | to_linear_off (float db, double threshold) |
Converts decibel (relative to 1.0) value to linear gain factor. If value is below given threshold, this function returns 0. | |
double | to_db (double linear) |
Converts linear gain factor to decibel (relative to 1.0) value. | |
float | to_db (float linear) |
double | apply (double lin, double gain) |
Apply a decibel gain to a linear signal. | |
float | apply (float lin, float gain) |
Apply a decibel gain to a linear signal. | |
double | apply_off (double lin, double gain, double threshold) |
Apply a decibel gain to a linear signal, muting if below threshold. | |
float | apply (float lin, float gain, float threshold) |
Variables | |
constexpr double | DB_REF = 1.0 |
Reference value for all decibel conversions. | |
Decibel conversion functions.
|
inline |
Apply a decibel gain to a linear signal.
lin | Linear signal |
gain | [dB] Gain |
Definition at line 76 of file decibel.h.
|
inline |
|
inline |
Definition at line 99 of file decibel.h.
|
inline |
Apply a decibel gain to a linear signal, muting if below threshold.
lin | |
gain | |
threshold | [dB] Off-threshold. Gains below this value will mute the input. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Converts decibel (relative to 1.0) value to linear gain factor.
If value is below given threshold, this function returns 0.
db | [dB] value to convert |
threshold | [dB] off-threshold |
Definition at line 37 of file decibel.h.
|
inline |
Converts decibel (relative to 1.0) value to linear gain factor.
If value is below given threshold, this function returns 0.
db | [dB] value to convert |
threshold | [dB] off-threshold |
Definition at line 48 of file decibel.h.