38typedef enum : uint8_t {
ra8_err_t ra8_audio_source_get_info(ra8_audio_source_t *source, ra8_audio_source_info_t *out_info)
Query a bound source's fixed output contract.
ra8_err_t ra8_audio_source_stop(ra8_audio_source_t *source)
Stop and release a bound source backend.
ra8_err_t ra8_audio_frame_validate(const ra8_audio_frame_t *frame)
Validate one PCM frame view.
void(* ra8_audio_frame_callback_t)(void *ctx, const ra8_audio_frame_t *frame)
Complete-frame callback for asynchronous audio sources.
ra8_audio_format_t
PCM container layouts supported by the facade.
@ k_ra8_audio_format_pcm_s32le
Signed 32-bit little-endian PCM.
@ k_ra8_audio_format_pcm_s16le
Signed 16-bit little-endian PCM.
ra8_err_t ra8_audio_source_capture(ra8_audio_source_t *source, const ra8_audio_buffer_t *buffer, ra8_audio_frame_t *out_frame)
Capture one fixed-size PCM frame into caller-owned storage.
ra8_err_t ra8_audio_source_stream_start(ra8_audio_source_t *source, const ra8_audio_buffer_t *buffer, ra8_audio_frame_callback_t callback, void *ctx)
Start asynchronous fixed-frame delivery into caller-owned scratch.
struct ra8_audio_source_iface ra8_audio_source_iface_t
Opaque source vtable implemented by concrete audio backends.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Caller-owned writable byte buffer.
uint32_t capacity
Writable capacity in bytes.
void * data
First writable byte.
Immutable view of one interleaved PCM frame.
uint32_t bytes
Valid byte count.
ra8_audio_format_t format
PCM container layout.
uint32_t sample_count
Sample frames per channel.
uint8_t channels
Interleaved channel count.
uint32_t sample_rate_hz
Sample frames per second.
const void * data
Borrowed interleaved PCM bytes.
uint32_t timestamp_ms
Capture-start monotonic milliseconds.
uint8_t valid_bits
Significant bits per sample.
Operations supplied by every audio source backend.
Fixed output contract and storage requirement for one source.
uint8_t valid_bits
Significant bits per sample.
uint32_t samples_per_frame
Sample frames returned per call.
ra8_audio_format_t format
PCM container layout.
uint32_t frame_bytes
Required capture-buffer capacity.
uint32_t sample_rate_hz
Sample frames per second.
uint8_t channels
Interleaved channel count.
Caller-owned handle binding an audio source backend and its state.
const ra8_audio_source_iface_t * iface
Bound source vtable (private).
void * ctx
Caller-owned backend state.