Expand description
Lock-free, real-time safe signal buffers
§Audio Buffers with Transcendental Support
This module provides lock-free, real-time safe buffers for signal processing
with full Transcendental support for both f32 and f64 sample types.
§Buffer Types
| Buffer | Description | Use Case |
|---|---|---|
PipeBuffer | Single-producer, single-consumer | Point-to-point node connections |
FanOutBuffer | One producer, multiple consumers | Broadcast signals to multiple nodes |
FanInBuffer | Multiple producers, one consumer | Mix multiple signals |
DelayLine | Circular buffer with delay | Effects like echo, reverb |
RingBuffer | Multi-producer, multi-consumer | Generic queue for any scenario |
§Features
- Lock-free - All buffers use atomic operations, no mutexes
- Wait-free - Bounded number of steps per operation
- Cache-line aligned - Prevents false sharing between threads
- Real-time safe - No allocations, no blocking, no system calls
- Statistically monitored - Track performance metrics
- Type-safe - Generic over
Transcendental(f32/f64) - Const generics - Sizes checked at compile time
Modules§
Structs§
- Atomic
Cell - Атомарная ячейка с полностью безопасным API
- Atomic
Stats - Atomic statistics for safe concurrent access
- Buffer
- Fixed-size audio buffer owned by a port.
- Buffer
Stats - Buffer statistics snapshot for monitoring and debugging
- Delay
Line - Delay line for audio effects
- FanIn
Buffer - Buffer for mixing multiple producers to one consumer
- FanOut
Buffer - Buffer for broadcasting from one producer to multiple consumers
- Pipe
Buffer - Single-producer, single-consumer buffer for node connections
- Read
Guard - Cache-line aligned storage for lock-free buffers
- Ring
Buffer - Кольцевой буфер с фиксированным размером
- Write
Guard - Write guard for buffer access
Enums§
- Atomic
Cell Error - Ошибки создания атомарной ячейки
- Buffer
Error - Buffer error types
Constants§
- CACHE_
LINE_ SIZE - Cache line size for alignment (64 bytes on x86_64)
- DEFAULT_
BUFFER_ SIZE - Default buffer size for most use cases
- MAX_
BUFFER_ SIZE - Maximum buffer size (2^16 = 65536 samples)
- MIN_
BUFFER_ SIZE - Minimum buffer size (must be at least 16 for most algorithms)
Traits§
- Signal
Buffer - Common trait for all signal buffers
Functions§
- array_
from_ fn - Helper function to create arrays without requiring
Copy
Type Aliases§
- Buffer
Result - Result type for buffer operations