|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
Per-channel 4x-oversampled inter-sample peak estimator. More...
#include <TruePeakDetector.h>
Public Member Functions | |
| void | reset () noexcept |
| Clears all channel histories. Safe on the audio thread. | |
| T | processSample (T sample, int channel) noexcept |
| Feeds one sample and returns the local true-peak estimate. | |
Static Public Member Functions | |
| static constexpr int | getLatency () noexcept |
| Group delay of the interpolation FIR in samples (per phase). | |
Per-channel 4x-oversampled inter-sample peak estimator.
Real-time safe: the polyphase coefficients are compile-time constants and processing is a fixed 48-multiply routine per sample. The reading is the maximum of the four official interpolation phases and the raw |sample| (the raw sample can only pull the estimate toward the true analog peak, never above it).
| T | Sample type (float or double). |
| MaxChannels | Number of independent channel histories. |
Definition at line 47 of file TruePeakDetector.h.
|
inlinestaticconstexprnoexcept |
Group delay of the interpolation FIR in samples (per phase).
Definition at line 101 of file TruePeakDetector.h.
|
inlinenoexcept |
Feeds one sample and returns the local true-peak estimate.
The result is the maximum of |sample| and the absolute values of the four official Annex 2 interpolation phases evaluated at this position (together they tile the 4x-oversampled reconstruction grid).
| sample | Input sample. |
| channel | Channel index (0-based; clamped into range). |
Definition at line 68 of file TruePeakDetector.h.
|
inlinenoexcept |
Clears all channel histories. Safe on the audio thread.
Definition at line 51 of file TruePeakDetector.h.