|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
|
nodiscard |
Resample a sequence from one rate to another with an anti-aliasing filter.
The ratio is reduced to up / down by its greatest common divisor and applied as a polyphase filter: the sequence is conceptually upsampled by up, lowpass filtered at the lower of the two Nyquist frequencies, and decimated by down, without computing the samples in between. Output sample k is at time k / to_rate and the filter delay is removed, so the first output sample lines up with the first input sample. Samples outside the input are zero. The same rates return a copy. Output blocks are computed in parallel.
The result matches scipy.signal.resample_poly with a Kaiser window of the same beta and a filter half length of zero_crossings * max(up, down) samples.
| src | Input samples |
| from_rate | Rate of the input in Hz |
| to_rate | Rate of the output in Hz |
| config | Anti-aliasing filter design |
Definition at line 135 of file Resample.cpp.
References resample(), and resampled_length().
Referenced by resample().