#include <audio/node/levelmeternode.h>
Public Types | |
enum | EType { PEAK, RMS } |
Public Member Functions | |
LevelMeterNode (NodeManager &nodeManager, TimeValue analysisWindowSize=10, bool rootProcess=true) | |
virtual | ~LevelMeterNode () |
float | getLevel () |
void | setType (EType type) |
void | process () override |
void | sampleRateChanged (float sampleRate) override |
![]() | |
Node (NodeManager &manager) | |
const std::set< OutputPin * > & | getOutputs () const |
const std::set< InputPinBase * > & | getInputs () const |
![]() | |
Process (NodeManager &nodeManager) | |
Process (ParentProcess &parent) | |
Process (const Process &)=delete | |
Process & | operator= (const Process &)=delete |
virtual | ~Process () |
void | update () |
NodeManager & | getNodeManager () const |
int | getBufferSize () const |
float | getSampleRate () const |
DiscreteTimeValue | getSampleTime () const |
Public Attributes | |
InputPin | input = {this} |
Additional Inherited Members | |
![]() | |
SampleBuffer & | getOutputBuffer (OutputPin &output) |
![]() | |
virtual void | bufferSizeChanged (int bufferSize) |
bool | isRegisteredWithNodeManager () const |
Node to measure the amplitude level of an audio signal. Can be used for VU meters or envelope followers for example. Can switch between measuring peaks of the signal or the root mean square.
|
strong |
LevelMeterNode | ( | NodeManager & | nodeManager, |
TimeValue | analysisWindowSize = 10 , |
||
bool | rootProcess = true |
||
) |
nodeManager | the node manager |
analysisWindowSize | the time window in milliseconds that will be used to generate one single output value. Also the period that corresponds to the analysis frequency. |
rootProcess | indicates that the node is registered as root process with the AudioNodeManager and is processed automatically. |
|
virtual |
float getLevel | ( | ) |
|
overridevirtual |
Has to be overwritted by descendants to specify the actual process.
Reimplemented from Node.
|
overridevirtual |
Called whenever the sample rate that the node system runs on changes. Can be overwritten to respond to changes
sampleRate | then new sample rate |
Reimplemented from Process.
void setType | ( | EType | type | ) |
Set the Type of the analysis. PEAK means the highest absolute amplitude within the analyzed window will be output. RMS means the root mean square of all values within the analyzed window will be output.
InputPin input = {this} |
The input for the audio signal that will be analyzed.