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

Simple simulation of fixpoint quantization. More...

Public Member Functions

 quantizer_t (unsigned int num_bits)
 Constructor. More...
 
void operator() (mha_wave_t &s)
 Quantization of a waveform fragment. More...
 

Private Attributes

bool limit
 
mha_real_t upscale
 
mha_real_t downscale
 
mha_real_t up_limit
 

Detailed Description

Simple simulation of fixpoint quantization.

Constructor & Destructor Documentation

◆ quantizer_t()

MHASignal::quantizer_t::quantizer_t ( unsigned int  num_bits)

Constructor.

Parameters
num_bitsNumber of bits to simulate, or zero for limiting to [-1,1] only.

Member Function Documentation

◆ operator()()

void MHASignal::quantizer_t::operator() ( mha_wave_t s)

Quantization of a waveform fragment.

Parameters
sWaveform fragment to be quantized.

Member Data Documentation

◆ limit

bool MHASignal::quantizer_t::limit
private

◆ upscale

mha_real_t MHASignal::quantizer_t::upscale
private

◆ downscale

mha_real_t MHASignal::quantizer_t::downscale
private

◆ up_limit

mha_real_t MHASignal::quantizer_t::up_limit
private

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