![]() |
Deluge Firmware 1.4.0
Build date: 2026.11.30
|
#include <thump_detector.h>
Public Member Functions | |
| std::optional< float > | push (int32_t sample) |
| Returns a decimated sample every kDecimation inputs. | |
| void | reset () |
Private Attributes | |
| std::array< int32_t, kDecimation > | first_ {} |
| std::array< int64_t, kDecimation > | second_ {} |
| int64_t | sumFirst_ = 0 |
| int64_t | sumSecond_ = 0 |
| int32_t | index_ = 0 |
Turns 44.1 kHz q31 samples into 5.5 kHz floats (full scale 1). Two cascaded 8-sample moving sums: their nulls sit on the multiples of 5.5 kHz, which are what would fold down into the thump's band.