| 13 | } |
| 14 | |
| 15 | float lab::AudioUtilities::linearToDecibels(float linear) |
| 16 | { |
| 17 | // It's not possible to calculate decibels for a zero linear value since it would be -Inf. |
| 18 | // -1000.0 dB represents a very tiny linear value in case we ever reach this case. |
| 19 | if (!linear) return -1000.0; |
| 20 | return (20.f * std::log10(linear)); |
| 21 | } |
| 22 | |
| 23 | double lab::AudioUtilities::discreteTimeConstantForSampleRate(double timeConstant, double sampleRate) |
| 24 | { |
nothing calls this directly
no outgoing calls
no test coverage detected