diff options
author | Chris Robinson <[email protected]> | 2022-05-13 10:12:28 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-05-13 15:40:15 -0700 |
commit | f2858ac8656c22e8d300cba42883bf3008206c1c (patch) | |
tree | 5066653c3969af2fca647eccc52a03e676548073 /common/polyphase_resampler.h | |
parent | 82c8e87ec77f4dff522d9ab62fdc0bd70f8214fb (diff) |
Resample before frequency analysis
We want to resample before minimum phase reconstruction since that changes the
phase relationship of the sampled signal, introducing a slight bit of noise
from truncated sampling. It's not clear that the frequency domain resampling
method is accurate, so resampling prior to frequency analysis is an alternative
to ensure the resulting frequencies are given the proper phase for sampling.
This also cleans up some micro allocations in loops.
Diffstat (limited to 'common/polyphase_resampler.h')
-rw-r--r-- | common/polyphase_resampler.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/polyphase_resampler.h b/common/polyphase_resampler.h index e9833d12..0b343d5a 100644 --- a/common/polyphase_resampler.h +++ b/common/polyphase_resampler.h @@ -4,6 +4,8 @@ #include <vector> +using uint = unsigned int; + /* This is a polyphase sinc-filtered resampler. It is built for very high * quality results, rather than real-time performance. * @@ -32,8 +34,6 @@ */ struct PPhaseResampler { - using uint = unsigned int; - void init(const uint srcRate, const uint dstRate); void process(const uint inN, const double *in, const uint outN, double *out); |