43 if (out_info ==
nullptr) {
81 if (buffer ==
nullptr) {
84 if (out_frame ==
nullptr) {
92 *out_frame = state->
frame;
113 if (ctx ==
nullptr) {
122 .stream_start =
nullptr,
130 if (source ==
nullptr) {
133 if (state ==
nullptr) {
136 if (frame ==
nullptr) {
143 state->
frame = *frame;
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
ra8_err_t ra8_audio_frame_validate(const ra8_audio_frame_t *frame)
Validate one PCM frame view.
struct ra8_audio_source_iface ra8_audio_source_iface_t
Opaque source vtable implemented by concrete audio backends.
Private audio-source vtable shared by concrete backends.
static const ra8_audio_source_iface_t s_memory_source_iface
static ra8_err_t internal_memory_stop(void *ctx)
Stop the memory replay backend.
static ra8_err_t internal_memory_get_info(void *ctx, ra8_audio_source_info_t *out_info)
Report metadata for the fixed memory frame.
ra8_err_t ra8_audio_source_memory_init(ra8_audio_source_t *source, ra8_audio_source_memory_state_t *state, const ra8_audio_frame_t *frame)
Bind one immutable PCM frame as a repeatable audio source.
static ra8_err_t internal_memory_capture(void *ctx, const ra8_audio_buffer_t *buffer, ra8_audio_frame_t *out_frame)
Copy the fixed memory frame into a caller buffer.
Fixed in-memory PCM replay backend for ra8_audio.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_null_ptr
Pointer was NULL where a valid pointer was required.
@ k_ra8_err_invalid_size
Invalid size parameter (too large, too small, or misaligned).
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
void * memcpy(void *dst, const void *src, size_t n)
Copy memory area between non-overlapping regions.
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.
uint8_t valid_bits
Significant bits per sample.
Fixed output contract and storage requirement for one source.
Caller-owned state for one immutable PCM replay frame.
ra8_audio_frame_t frame
Borrowed fixed frame (private).
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.