The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
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_t * | 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). More... | |
Private Attributes | |
mha_real_t | tau_cfg |
Time constant for the exponential average / s. More... | |
std::vector< mha_real_t > | rms_prev_cfg |
Vector of RMS values for each channel of the previous input signal fragment. More... | |
Runtime configuration class for computing the exponentially averaged RMS of the channels of an input signal and storing it in an AC variable.
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.
tau | Time constant for the exponential average / s |
Get_rms | Pointer to the current instance of the plugin interface class |
rms_prev | Vector of RMS values for each channel of the previous input signal fragment |
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
signal | Pointer to the current input signal fragment |
Get_rms | Pointer to the current instance of the plugin interface class |
rms_ac | AC variable containing a pointer to the RMS values for each channel of the current input signal fragment |
|
private |
Time constant for the exponential average / s.
|
private |
Vector of RMS values for each channel of the previous input signal fragment.