The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Runtime config class for plugin spec2wave, the counterpart of wave2spec. More...
Public Member Functions | |
spec2wave_t (unsigned nfft_, unsigned nwnd_, unsigned nwndshift_, unsigned nch, mha_real_t ramplen, const MHAWindow::base_t &postwin) | |
Constructor. More... | |
~spec2wave_t () | |
mha_wave_t * | process (mha_spec_t *) |
Private Attributes | |
mha_fft_t | ft |
FFT class. More... | |
unsigned int | npad1 |
length of zero padding before window More... | |
unsigned int | npad2 |
length of zero padding after window More... | |
hanning_ramps_t | ramps |
MHASignal::waveform_t | calc_out |
MHASignal::waveform_t | out_buf |
MHASignal::waveform_t | write_buf |
mha_real_t | sc |
unsigned int | nfft |
unsigned int | nwndshift |
MHAWindow::base_t | postwindow |
Runtime config class for plugin spec2wave, the counterpart of wave2spec.
spec2wave_t::spec2wave_t | ( | unsigned | nfft_, |
unsigned | nwnd_, | ||
unsigned | nwndshift_, | ||
unsigned | nch, | ||
mha_real_t | ramplen, | ||
const MHAWindow::base_t & | postwin | ||
) |
Constructor.
nfft_ | FFT length. |
nwnd_ | Overlap-add analysis window length. |
nwndshift_ | Overlap-add hop size. Needed to compute scaling. |
nch | Number of audio channels. |
ramplen | A user-configurable factor which is applied to the length of the zero paddings in samples before and after the analysis window. Rising and falling hanning ramps are computed for the resulting ramp lengths in member ramps. |
postwin | Post windowing function. This window is applied in addition to the hanning ramps. It is applied to the whole output waveform computed by the inverse FFT before the signal is overlap-added to the previous output. |
spec2wave_t::~spec2wave_t | ( | ) |
mha_wave_t * spec2wave_t::process | ( | mha_spec_t * | spec_in | ) |
|
private |
FFT class.
|
private |
length of zero padding before window
|
private |
length of zero padding after window
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |