Gin
Public Member Functions | Protected Attributes | List of all members
LevelTracker Class Reference

Track audio levels with decay in dB. More...

Public Member Functions

 LevelTracker (float decayPerSecond=30.0f)
 
void trackBuffer (const float *buffer, int numSamples)
 
void trackBuffer (juce::AudioSampleBuffer &buffer)
 
void trackSample (float f)
 
float getLevel () const
 
bool getClip () const
 
void clearClip ()
 

Protected Attributes

float peakTime = 0.0f
 
float peakLevel = -100.0f
 
float decayRate = 0.0f
 
bool clip = false
 

Detailed Description

Track audio levels with decay in dB.

Constructor & Destructor Documentation

◆ LevelTracker()

LevelTracker::LevelTracker ( float  decayPerSecond = 30.0f)

Member Function Documentation

◆ trackBuffer() [1/2]

void LevelTracker::trackBuffer ( const float *  buffer,
int  numSamples 
)

◆ trackBuffer() [2/2]

void LevelTracker::trackBuffer ( juce::AudioSampleBuffer &  buffer)

◆ trackSample()

void LevelTracker::trackSample ( float  f)

◆ getLevel()

float LevelTracker::getLevel ( ) const

◆ getClip()

bool LevelTracker::getClip ( ) const

References clip.

◆ clearClip()

void LevelTracker::clearClip ( )

References clip.

Member Data Documentation

◆ peakTime

float LevelTracker::peakTime = 0.0f
protected

◆ peakLevel

float LevelTracker::peakLevel = -100.0f
protected

◆ decayRate

float LevelTracker::decayRate = 0.0f
protected

◆ clip

bool LevelTracker::clip = false
protected

Referenced by clearClip(), and getClip().


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