|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
Finds and renders bounded, deterministic loop seams. More...
#include <LoopFinder.h>
Classes | |
| struct | Range |
| struct | Result |
| struct | Settings |
Public Types | |
| enum class | Status : std::uint8_t { Success , EmptyInput , InvalidArgument , InputTooShort , InputTooLong , NonFiniteInput , InsufficientActivity , CandidateLimitExceeded , NoAcceptableLoop , InvalidOutput , NumericalFailure } |
Public Member Functions | |
| Result | find (AudioBufferView< const T > audio, Range startRange, Range endRange, std::int64_t minLoopLength, std::int64_t maxLoopLength, const Settings &settings={}) const |
| Searches explicit inclusive endpoint ranges for the lowest-cost supported loop seam. | |
Static Public Member Functions | |
| static Status | renderLoop (AudioBufferView< const T > audio, const Result &loop, AudioBufferView< T > output) noexcept |
| Renders one normalized equal-power loop cycle without allocation. | |
Finds and renders bounded, deterministic loop seams.
| T | Sample type (float or double). |
find() is an offline operation: one caller owns an instance for the complete search and bounded scratch allocation is permitted. renderLoop() performs no allocation and is transactional; invalid or non-finite input leaves the destination unchanged. Source samples supplied to either operation must be finite.
Definition at line 52 of file LoopFinder.h.
|
strong |
| Enumerator | |
|---|---|
| Success | |
| EmptyInput | |
| InvalidArgument | |
| InputTooShort | |
| InputTooLong | |
| NonFiniteInput | |
| InsufficientActivity | |
| CandidateLimitExceeded | |
| NoAcceptableLoop | |
| InvalidOutput | |
| NumericalFailure | |
Definition at line 55 of file LoopFinder.h.
|
inline |
Searches explicit inclusive endpoint ranges for the lowest-cost supported loop seam.
The complete source is checked for finiteness. Coarse and refinement coordinate counts are conservatively bounded before any candidate is scored; scratch is independent of the number of candidates.
Definition at line 120 of file LoopFinder.h.
|
inlinestaticnoexcept |
Renders one normalized equal-power loop cycle without allocation.
Definition at line 355 of file LoopFinder.h.