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

Classes

class  fftfilter_t
 
class  interface_t
 

Functions

unsigned int irs_length (const MHAParser::mfloat_t &irs)
 
unsigned int irs_validator (const MHAParser::mfloat_t &irs, const unsigned int &channels, const unsigned int &fragsize, const unsigned int &fftlen)
 

Function Documentation

◆ irs_length()

unsigned int fftfilter::irs_length ( const MHAParser::mfloat_t irs)

Return the length of the longest vector in irs.

Parameters
irs"Matrix" of floats parser variable
Returns
length of the longest vector in irs, or 1 if all vectors are empty

◆ irs_validator()

unsigned int fftfilter::irs_validator ( const MHAParser::mfloat_t irs,
const unsigned int &  channels,
const unsigned int &  fragsize,
const unsigned int &  fftlen 
)

Validity checks. Throws Error if parameters are invalid: Number of channels must be > 0, fftlen must be >= fragsize. The number of rows in irs has to match the number of channels, or has to be exactly 1. None of the row vectors may be empty. The longest supported impulse response is (fftlen - fragsize + 1). Impulse responses longer than (fftlen - fragsize + 1) would cause temporal aliasing.

Parameters
irsThe matrix containing the impulse responses (one response per channel, or the same response for every channels) as set by the parser.
channelsThe number of prepared audio channels for this MHA plugin.
fragsizeThe block size (samples per channel) for waveform audio data
fftlenFFT length used for filtering.
Returns
the length of the longest impulse response vector in irs.