A bounded, allocation-free-at-runtime waveset transformation engine. More...
#include <waveset_transformer.hpp>
Classes | |
| struct | Capacity |
| struct | ProgramStep |
| struct | OperationProgram |
Public Types | |
| enum class | ZeroCrossingPolarity : std::uint8_t { Rising , Falling , Both } |
| enum class | Operation : std::uint8_t { Pass , Repeat , Omit , Reverse , Rotate , Normalize , CoordinateSelect } |
Public Member Functions | |
| bool | prepare (double sample_rate, Capacity capacity) |
| bool | prepared () const noexcept |
| bool | set_program (std::uint8_t slot, const OperationProgram &program) |
| bool | request_program_slot (std::uint8_t slot) noexcept |
| bool | set_zero_crossing_polarity (ZeroCrossingPolarity polarity) noexcept |
| bool | set_zero_crossing_epsilon (SampleType epsilon) noexcept |
| bool | set_crossfade_law (CrossfadeGainLaw law) noexcept |
| bool | set_crossfade_duration_ms (SampleType duration_ms) noexcept |
| bool | set_normalize_ratio (SampleType ratio) noexcept |
| bool | set_coordinate_seed (std::uint64_t seed) noexcept |
| int | push (const SampleType *input, int count) noexcept |
| int | pull (SampleType *output, int count) noexcept |
| void | finish_input () noexcept |
| bool | drained () const noexcept |
| void | reset () noexcept |
| int | latency_samples () const noexcept |
| int | max_lookahead_samples () const noexcept |
| std::size_t | tail_samples () const noexcept |
Static Public Attributes | |
| static constexpr std::size_t | kMaxProgramSlots = 8 |
| static constexpr std::size_t | kMaxCoordinateChoices = 8 |
| static constexpr int | kMaxRepeatCount = 16 |
| static constexpr int | kMaxRotateWindow = 256 |
A bounded, allocation-free-at-runtime waveset transformation engine.
Call prepare() and set_program() only from a control thread; both may allocate or copy. After preparation, push(), pull(), finish_input(), and the parameter setters are suitable for the realtime audio thread and perform no allocation or blocking synchronization. One audio thread owns push()/pull()/finish_input()/reset(); control-thread publication may race with that owner only through the documented setters and program-slot requests. Those operations fail closed by returning false when a concurrent lifecycle transition owns the packed control state.
push() may accept fewer samples than requested when its bounded reservation/output capacity is exhausted. The caller must pull available output and retry the unaccepted suffix. Output remains owned by the transformer until pull() consumes it, and drained() becomes true only after input has finished and all buffered output and reservations have retired.
|
strong |
|
strong |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |