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

Runtime configuration of the delaysum_wave plugin. More...

Inheritance diagram for delaysum::delaysum_wave_t:
Inheritance graph

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_tprocess (mha_wave_t *)
 
- Public Member Functions inherited from MHASignal::delay_t
 delay_t (std::vector< int > delays, unsigned int channels)
 Constructor. More...
 
mha_wave_tprocess (mha_wave_t *s)
 Processing method. More...
 
 ~delay_t ()
 
std::string inspect () const
 

Private Attributes

std::vector< mha_real_tweights
 Relative weights for each channel. Order is [chan0, chan1, ...]. More...
 
MHASignal::waveform_t out
 Output waveform. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ delaysum_wave_t()

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.

Parameters
nchNumber of input channels.
fragsizeSize of one input fragment in frames.
weights_Vector of weights for each channel.
delays_Vector of delays, one entry per channel.

Member Function Documentation

◆ process()

mha_wave_t * delaysum::delaysum_wave_t::process ( mha_wave_t signal)

Member Data Documentation

◆ weights

std::vector<mha_real_t> delaysum::delaysum_wave_t::weights
private

Relative weights for each channel. Order is [chan0, chan1, ...].

◆ out

MHASignal::waveform_t delaysum::delaysum_wave_t::out
private

Output waveform.


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