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

All types for the fshift plugin live in this namespace. More...

Classes

class  fshift_config_t
 fshift runtime config class More...
 
class  fshift_t
 fshift plugin interface class More...
 

Functions

int fft_find_bin (mha_real_t frequency, unsigned fftlen, mha_real_t srate)
 Finds bin number of FFT bin nearest to the given frequency. More...
 

Detailed Description

All types for the fshift plugin live in this namespace.

Function Documentation

◆ fft_find_bin()

int fshift::fft_find_bin ( mha_real_t  frequency,
unsigned  fftlen,
mha_real_t  srate 
)

Finds bin number of FFT bin nearest to the given frequency.

Parameters
frequencyThe frequency for which to look. Has to be in range [-srate/2,+srate/2]
fftlenLength of the FFT.
srateSampling rate of the waveform from which the FFT originates.
Returns
Bin number of the FFT bin corresponding to frequency