|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Audio streams and the sample clock. More...
Audio streams and the sample clock.
Classes | |
| struct | AudioConfig |
| Audio stream configuration. More... | |
| class | FrameCount |
| struct | FrameStamp |
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 : uint8_t { 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)
One int32_t per sample: 24-bit two's complement, right-aligned, the format <sbl/dsp/types/convert.hpp> converts. Saturation is the caller's responsibility; interleave_from_float() clamps to +/-1.0 before scaling. 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 | Frame count, at most 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) |