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

Runtime config class for dc_simple plugin. More...

Inheritance diagram for dc_simple::dc_t:
Inheritance graph

Classes

class  line_t
 Helper class for usage in computing compression, expansion and limiting. More...
 

Public Member Functions

 dc_t (const dc_vars_t &vars, unsigned int nch)
 Constructor. More...
 
mha_spec_tprocess (mha_spec_t *s, mha_wave_t *level_db)
 Process callback. More...
 
mha_wave_tprocess (mha_wave_t *s, mha_wave_t *level_db)
 Process callback. More...
 

Public Attributes

std::vector< float > mon_l
 
std::vector< float > mon_g
 

Private Attributes

std::vector< mha_real_texpansion_threshold
 Threshold below which to apply expansion. More...
 
std::vector< mha_real_tlimiter_threshold
 Threshold below which to compress. More...
 
std::vector< line_tcompression
 The linear function for applying compression. More...
 
std::vector< line_texpansion
 The linear function for applying expansion. More...
 
std::vector< line_tlimiter
 The linear function for applying limiting. More...
 
std::vector< mha_real_tmaxgain
 Gain should not exceed this value. More...
 
unsigned int nbands
 Number of bands. More...
 

Additional Inherited Members

- Private Member Functions inherited from dc_simple::dc_vars_validator_t
 dc_vars_validator_t (const dc_vars_t &v, unsigned int s)
 Checks that all vectors in v have size s or size 1. More...
 

Detailed Description

Runtime config class for dc_simple plugin.

Constructor & Destructor Documentation

◆ dc_t()

dc_simple::dc_t::dc_t ( const dc_vars_t vars,
unsigned int  nch 
)

Constructor.

Member Function Documentation

◆ process() [1/2]

mha_spec_t * dc_simple::dc_t::process ( mha_spec_t s,
mha_wave_t level_db 
)

Process callback.

Compresses, expands or limits depending on the gain settings and filtered signal levels. Compresses the spectrum input signal in individual bands.

Parameters
sinput/output signal
level_dbsmoothed levels of input signal in dB SPL
Returns
s. The input signal is modified in place.

◆ process() [2/2]

mha_wave_t * dc_simple::dc_t::process ( mha_wave_t s,
mha_wave_t level_db 
)

Process callback.

Compresses, expands or limits depending on the gain settings and filtered signal levels. Compresses the waveform input signal in individual bands.

Parameters
sinput/output signal
level_dbsmoothed levels of input signal in dB SPL
Returns
s. The input signal is modified in place.

Member Data Documentation

◆ expansion_threshold

std::vector<mha_real_t> dc_simple::dc_t::expansion_threshold
private

Threshold below which to apply expansion.

◆ limiter_threshold

std::vector<mha_real_t> dc_simple::dc_t::limiter_threshold
private

Threshold below which to compress.

◆ compression

std::vector<line_t> dc_simple::dc_t::compression
private

The linear function for applying compression.

◆ expansion

std::vector<line_t> dc_simple::dc_t::expansion
private

The linear function for applying expansion.

◆ limiter

std::vector<line_t> dc_simple::dc_t::limiter
private

The linear function for applying limiting.

◆ maxgain

std::vector<mha_real_t> dc_simple::dc_t::maxgain
private

Gain should not exceed this value.

◆ nbands

unsigned int dc_simple::dc_t::nbands
private

Number of bands.

◆ mon_l

std::vector<float> dc_simple::dc_t::mon_l

◆ mon_g

std::vector<float> dc_simple::dc_t::mon_g

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