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

Runtime configuration class for setting the channels of an output signal (e.g. More...

Public Member Functions

 Set_rms_cfg (std::string ac_name_in, std::string ac_name_out)
 Constructor of the runtime configuration class. More...
 
mha_wave_tprocess (mha_wave_t *signal, mha_wave_t channel_rms_in, mha_wave_t channel_rms_out)
 Process function of the runtime configuration class (main signal processing function). More...
 

Private Attributes

std::string ac_name_in_cfg
 Name of the AC variable containing the (exponentially averaged) RMS of the original input signal to be applied to the output signal. More...
 
std::string ac_name_out_cfg
 Name of the AC variable containing the (exponentially averaged) RMS of the output signal used for normalization. More...
 

Detailed Description

Runtime configuration class for setting the channels of an output signal (e.g.

of some signal processing operation) to the RMS values of the original input signal

Constructor & Destructor Documentation

◆ Set_rms_cfg()

Set_rms_cfg::Set_rms_cfg ( std::string  ac_name_in,
std::string  ac_name_out 
)

Constructor of the runtime configuration class.

Parameters
ac_name_inName of the AC variable containing the (exponentially averaged) RMS of the original input signal to be applied to the output signal (cannot be changed at runtime)
ac_name_outName of the AC variable containing the (exponentially averaged) RMS of the output signal used for normalization (cannot be changed at runtime)

Member Function Documentation

◆ process()

mha_wave_t * Set_rms_cfg::process ( mha_wave_t signal,
mha_wave_t  channel_rms_in,
mha_wave_t  channel_rms_out 
)

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

It sets the RMS of the output signal fragment to the value specified by the parameter channel_rms_in

Parameters
signalPointer to the current input signal fragment
channel_rms_inContains a vector of RMS values for each channel of the original input signal to be applied to the output signal
channel_rms_outContains a vector of RMS values for each channel of the output signal used for normalization
Returns
Pointer to the output signal fragment (with adjusted RMS)

Member Data Documentation

◆ ac_name_in_cfg

std::string Set_rms_cfg::ac_name_in_cfg
private

Name of the AC variable containing the (exponentially averaged) RMS of the original input signal to be applied to the output signal.

◆ ac_name_out_cfg

std::string Set_rms_cfg::ac_name_out_cfg
private

Name of the AC variable containing the (exponentially averaged) RMS of the output signal used for normalization.


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