The normalised cumulative of a power spectrum on a uniform bin grid. More...
#include <loudness_compensation.hpp>
Public Member Functions | |
| void | prepare (std::size_t bins) |
Control thread: size for bins. | |
| void | assign (std::span< const double > power, double bin_hz) noexcept |
| Allocation-free once prepared for at least power.size() bins. | |
| double | weight (double lo_hz, double hi_hz) const noexcept |
| Energy between two frequencies; the whole spectrum weighs 1. | |
The normalised cumulative of a power spectrum on a uniform bin grid.
Bin k spans [(k - 1/2) df, (k + 1/2) df]; the energy is linear inside a bin.
|
inlinenoexcept |
Allocation-free once prepared for at least power.size() bins.
|
inline |
Control thread: size for bins.
|
inlinenodiscardnoexcept |
Energy between two frequencies; the whole spectrum weighs 1.