|
DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
|
The fixed-capacity, allocation-free event list one block of host events is collected into (a member of each backend's plugin object, so nothing large lives on the audio thread's stack). More...
#include <DSParkPlugin.h>
Public Member Functions | |
| void | clear () noexcept |
| void | add (const BlockEvent &event) noexcept |
| void | sort () noexcept |
| int | size () const noexcept |
| int | dropped () const noexcept |
| BlockEvent & | operator[] (int i) noexcept |
| const BlockEvent & | operator[] (int i) const noexcept |
The fixed-capacity, allocation-free event list one block of host events is collected into (a member of each backend's plugin object, so nothing large lives on the audio thread's stack).
Within capacity every event is kept. Once the list is full it merges instead of dropping blindly: a parameter or bypass point overwrites the newest stored point of the SAME parameter (a later point supersedes it), and any other event takes the slot of a parameter point that a newer point of its own parameter has already superseded. The final value of every parameter and every MIDI event therefore survive whenever the block holds at most kMaxBlockEvents distinct parameters plus MIDI events; what is given up first is intermediate automation, which only loses its exact position inside the block. dropped() counts what still could not fit.
Every operation is O(1) amortised (a small open-addressed table maps a parameter id to its newest slot; the table is invalidated by a generation counter, not cleared). Not thread-safe: one block, one thread.
Definition at line 989 of file DSParkPlugin.h.
|
inlinenoexcept |
Adds one event (see the class notes for the merge rule).
Definition at line 1007 of file DSParkPlugin.h.
|
inlinenoexcept |
Empties the list for the next block.
Definition at line 993 of file DSParkPlugin.h.
|
inlinenoexcept |
Definition at line 1047 of file DSParkPlugin.h.
|
inlinenoexcept |
Definition at line 1049 of file DSParkPlugin.h.
|
inlinenoexcept |
Definition at line 1048 of file DSParkPlugin.h.
|
inlinenoexcept |
Definition at line 1046 of file DSParkPlugin.h.
|
inlinenoexcept |
Sorts by (offset, arrival order).
Definition at line 1044 of file DSParkPlugin.h.