Crate ravet_ embedded_ gain
Expand description
Allocation-free stereo gain reference; gain changes are immediate (no smoothing).
Gain shares the portable processor contract with desktop RAVET but needs
no signal/surface crate, allocator, atomics, HAL or OS. Gain ID zero accepts
finite amplitudes 0..=4; unknown events/IDs are ignored. C uses block-start gain.
The opt-in firmware-panic handler is for standalone bare-metal static libraries;
Rust firmware should supply its own handler and leave that feature disabled.
Structs§
- Gain
- C-layout reference state, exclusively owned by the callback/firmware. Treat fields as opaque in C; initialize through the reference ABI.
Constants§
Functions§
- ravet_
embedded_ gain_ init⚠ - Initialize/reinitialize caller-owned state; returns 0 on success, -1 on rejection. Rejection leaves state unchanged. Stop callbacks before initialization.
- ravet_
embedded_ gain_ process⚠ - Process interleaved stereo f32; exact input/output aliasing is allowed. Returns 0 on success, -1 on rejection. Input/output lengths are bounded to 128 samples. Valid output storage is silenced over its requested active prefix on rejection; tails are preserved. Invalid output length/pointer returns without writes. No allocation, panic recovery, driver or deadline guarantee.
- ravet_
embedded_ gain_ set⚠ - Set block-start gain; returns 0 on success, -1 on invalid value/null state.