The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
Get_rms_cfg Class Reference

Runtime configuration class for computing the exponentially averaged RMS of the channels of an input signal and storing it in an AC variable. More...

Public Member Functions

 Get_rms_cfg (mha_real_t tau, Get_rms *Get_rms, std::vector< mha_real_t > rms_prev)
 Constructor of the runtime configuration class. More...
 
mha_wave_tprocess (mha_wave_t *signal, Get_rms *Get_rms, MHA_AC::waveform_t *rms_ac)
 Process function of the runtime configuration class (main signal processing function). More...
 

Private Attributes

mha_real_t tau_cfg
 Time constant for the exponential average / s. More...
 
std::vector< mha_real_trms_prev_cfg
 Vector of RMS values for each channel of the previous input signal fragment. More...
 

Detailed Description

Runtime configuration class for computing the exponentially averaged RMS of the channels of an input signal and storing it in an AC variable.

Constructor & Destructor Documentation

◆ Get_rms_cfg()

Get_rms_cfg::Get_rms_cfg ( mha_real_t  tau,
Get_rms Get_rms,
std::vector< mha_real_t rms_prev 
)

Constructor of the runtime configuration class.

Parameters
tauTime constant for the exponential average / s
Get_rmsPointer to the current instance of the plugin interface class
rms_prevVector of RMS values for each channel of the previous input signal fragment

Member Function Documentation

◆ process()

mha_wave_t * Get_rms_cfg::process ( mha_wave_t signal,
Get_rms Get_rms,
MHA_AC::waveform_t rms_ac 
)

Process function of the runtime configuration class (main signal processing function).

It leaves the input signal fragment unchanged; its purpose is to compute the AC variable rms_ac for further processing in the plugin chain

Parameters
signalPointer to the current input signal fragment
Get_rmsPointer to the current instance of the plugin interface class
rms_acAC variable containing a pointer to the RMS values for each channel of the current input signal fragment
Returns
Pointer to the (unchanged) output signal fragment

Member Data Documentation

◆ tau_cfg

mha_real_t Get_rms_cfg::tau_cfg
private

Time constant for the exponential average / s.

◆ rms_prev_cfg

std::vector<mha_real_t> Get_rms_cfg::rms_prev_cfg
private

Vector of RMS values for each channel of the previous input signal fragment.


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