Sliding window RMS meter, one reading per channel.
More...
#include <gin_rmsmeter.h>
|
| | RMSMeter ()=default |
| void | prepare (double sampleRate, int numChannels, double windowSeconds=0.3) |
| | Not realtime safe.
|
| void | reset () |
| | Clears the window.
|
| void | process (const juce::AudioBuffer< float > &buffer) |
| float | getRMS (int channel) const |
| | RMS of the window, dBFS.
|
| float | getRMSLinear (int channel) const |
| | RMS of the window, linear.
|
| int | getNumChannels () const |
| double | getWindowSeconds () const |
|
| static constexpr float | silence = -100.0f |
Sliding window RMS meter, one reading per channel.
The window length is fixed at prepare() time. Readings are plain RMS, so a full scale sine reads -3.01 dBFS; add 3.01 dB for an AES-17 style scale where a full scale sine reads 0.
Call process() from the audio thread; the getters are safe from any thread.
◆ RMSMeter()
◆ prepare()
| void RMSMeter::prepare |
( |
double | sampleRate, |
|
|
int | numChannels, |
|
|
double | windowSeconds = 0.3 ) |
◆ reset()
Clears the window.
Safe from any thread.
◆ process()
| void RMSMeter::process |
( |
const juce::AudioBuffer< float > & | buffer | ) |
|
◆ getRMS()
| float RMSMeter::getRMS |
( |
int | channel | ) |
const |
◆ getRMSLinear()
| float RMSMeter::getRMSLinear |
( |
int | channel | ) |
const |
RMS of the window, linear.
◆ getNumChannels()
| int RMSMeter::getNumChannels |
( |
| ) |
const |
◆ getWindowSeconds()
| double RMSMeter::getWindowSeconds |
( |
| ) |
const |
◆ silence
| float RMSMeter::silence = -100.0f |
|
staticconstexpr |
The documentation for this class was generated from the following file: