The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Runtime configuration of the delaysum_wave plugin. More...
Public Member Functions | |
delaysum_wave_t (unsigned int nch, unsigned int fragsize, const std::vector< mha_real_t > &weights_, const std::vector< int > &delays_) | |
Constructor of the runtime configuration. More... | |
mha_wave_t * | process (mha_wave_t *) |
Public Member Functions inherited from MHASignal::delay_t | |
delay_t (std::vector< int > delays, unsigned int channels) | |
Constructor. More... | |
mha_wave_t * | process (mha_wave_t *s) |
Processing method. More... | |
~delay_t () | |
std::string | inspect () const |
Private Attributes | |
std::vector< mha_real_t > | weights |
Relative weights for each channel. Order is [chan0, chan1, ...]. More... | |
MHASignal::waveform_t | out |
Output waveform. More... | |
Runtime configuration of the delaysum_wave plugin.
Inherits from the already present delay_t class. The constructor initializes and validates the runtime configuration and forwards the delay vector to the delay_t class. The process function first calls delay_t::process and then multiplies every output channel with its weight and adds them into the output channel.
delaysum::delaysum_wave_t::delaysum_wave_t | ( | unsigned int | nch, |
unsigned int | fragsize, | ||
const std::vector< mha_real_t > & | weights_, | ||
const std::vector< int > & | delays_ | ||
) |
Constructor of the runtime configuration.
nch | Number of input channels. |
fragsize | Size of one input fragment in frames. |
weights_ | Vector of weights for each channel. |
delays_ | Vector of delays, one entry per channel. |
mha_wave_t * delaysum::delaysum_wave_t::process | ( | mha_wave_t * | signal | ) |
|
private |
Relative weights for each channel. Order is [chan0, chan1, ...].
|
private |
Output waveform.