![]() |
The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
implements subsample delay in spectral domain. More...
Public Member Functions | |
| subsample_delay_t (const std::vector< float > &subsample_delay, unsigned fftlen) | |
| Constructor computes complex phase factors to apply to achieve subsample delay. More... | |
| void | process (mha_spec_t *s) |
| Apply the phase_gains to s to achieve the subsample delay. More... | |
| void | process (mha_spec_t *s, unsigned idx) |
| Apply the pase gains to channel idx in s to achieve the subsample delay in channel idx. More... | |
Public Attributes | |
| spectrum_t | phase_gains |
| The complex factors to apply to achieve the necessary phase shift. More... | |
Private Attributes | |
| unsigned | last_complex_bin |
| index of the last complex fft bin for the used fft length. More... | |
implements subsample delay in spectral domain.
When transformed back to the time domain, the signal is delayed by the configured fraction of a sample. This operation must not be used in a smoothgains bracket.
| MHASignal::subsample_delay_t::subsample_delay_t | ( | const std::vector< float > & | subsample_delay, |
| unsigned | fftlen | ||
| ) |
Constructor computes complex phase factors to apply to achieve subsample delay.
| subsample_delay | The subsample delay to apply. -0.5 <= subsample_delay <= 0.5 |
| fftlen | FFT length |
| MHA_Error | if the parameters are out of range |
| void MHASignal::subsample_delay_t::process | ( | mha_spec_t * | s | ) |
Apply the phase_gains to s to achieve the subsample delay.
| void MHASignal::subsample_delay_t::process | ( | mha_spec_t * | s, |
| unsigned | idx | ||
| ) |
Apply the pase gains to channel idx in s to achieve the subsample delay in channel idx.
| s | signal |
| idx | channel index, 0-based |
| MHA_Error | if idx >= s->num_channels |
| spectrum_t MHASignal::subsample_delay_t::phase_gains |
The complex factors to apply to achieve the necessary phase shift.
|
private |
index of the last complex fft bin for the used fft length.