|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Classes | |
| struct | AudioConfig |
| Audio stream configuration. More... | |
Typedefs | |
| using | AudioCallback = void(*)(int32_t *tx_buf, const int32_t *rx_buf, uint16_t frames) |
| Audio processing callback (called from ISR context) | |
Enumerations | |
| enum class | SaiLayout { A_TX_B_RX , A_RX_B_TX } |
| SAI block direction layout. More... | |
| using sbl::hal::audio::AudioCallback = typedef void(*)(int32_t* tx_buf, const int32_t* rx_buf, uint16_t frames) |
Audio processing callback (called from ISR context)
Audio samples are int32_t in 24-bit signed range (±8,388,607). Saturation is the caller's responsibility — use sbl::dsp::saturate_24() from <sbl/dsp/fixed.hpp> before writing to tx_buf. The SAI driver outputs raw values with no implicit clamping.
| tx_buf | Interleaved output [L0,R0,L1,R1,...] - fill these |
| rx_buf | Interleaved input [L0,R0,L1,R1,...] - read-only |
| frames | Number of stereo frames (= block_size from AudioConfig) |
|
strong |
SAI block direction layout.
Determines which SAI block is TX (to DAC) and which is RX (from ADC). This is board-level configuration — the codec wiring determines the mapping.
| Enumerator | |
|---|---|
| A_TX_B_RX | Block A = Master TX, Block B = Slave RX (Daisy Seed / AK4556) |
| A_RX_B_TX | Block A = Slave RX, Block B = Master TX (Patch SM / PCM3060) |