|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
Lock-free single-producer, single-consumer (SPSC) bounded queue. More...
#include <array>#include <atomic>#include <cstddef>#include <type_traits>

Go to the source code of this file.
Classes | |
| class | dspark::SpscQueue< T, Capacity > |
Namespaces | |
| namespace | dspark |
| Main namespace for the DSPark framework. | |
Variables | |
| constexpr std::size_t | dspark::kCacheLineSize = 64 |
Lock-free single-producer, single-consumer (SPSC) bounded queue.
Designed for passing parameter snapshots from a control thread (GUI, automation) to the audio thread without locks or allocations at runtime. Features a local index caching optimization to aggressively minimize CPU cache-line bouncing.
Dependencies: C++20 standard library only (<array>, <atomic>, <cstddef>).
| T | Element type. Must be trivially copyable for lock-free safety. |
| Capacity | Maximum number of slots. Must be a power of two for efficient modular arithmetic. Note: Actual usable capacity is (Capacity - 1) to safely distinguish between full and empty states. |
Definition in file SpscQueue.h.