Photon Voice v2.53

Public Member Functions | Protected Attributes | Properties | List of all members
AudioUtil.LevelMeter< T > Class Template Referenceabstract

Audio Level Meter. More...

Inherits IProcessor< T >, and AudioUtil.ILevelMeter.

Public Member Functions

void ResetAccumAvgPeakAmp ()
 Reset AccumAvgPeakAmp. More...
 
abstract T[] Process (T[] buf)
 Process a frame of data. More...
 
void Dispose ()
 

Protected Attributes

float ampSum
 
float ampPeak
 
int bufferSize
 
float[] prevValues
 
int prevValuesHead
 
float accumAvgPeakAmpSum
 
int accumAvgPeakAmpCount
 
float currentPeakAmp
 
float norm
 

Properties

float CurrentAvgAmp [get]
 
float CurrentPeakAmp [get, protected set]
 
float? AccumAvgPeakAmp [get]
 
- Properties inherited from AudioUtil.ILevelMeter
float CurrentAvgAmp [get]
 Average amplitude value over last half second. More...
 
float CurrentPeakAmp [get]
 Maximum amplitude value over last half second sec. More...
 
float AccumAvgPeakAmp [get]
 Average of CurrentPeakAmps since last reset. More...
 

Detailed Description

Audio Level Meter.

Member Function Documentation

◆ Process()

abstract T [] Process ( T[]  buf)
pure virtual

Process a frame of data.

Parameters
bufBuffer containing input data
Returns
Buffer containing output data or null if frame has been discarded (VAD)

Implements IProcessor< T >.

◆ ResetAccumAvgPeakAmp()

void ResetAccumAvgPeakAmp ( )