ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_audio_source_memory.h File Reference

Fixed in-memory PCM replay backend for ra8_audio. More...

#include "ra8_audio.h"
Include dependency graph for ra8_audio_source_memory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ra8_audio_source_memory_state_t
 Caller-owned state for one immutable PCM replay frame. More...

Functions

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.

Detailed Description

Fixed in-memory PCM replay backend for ra8_audio.

Binds an immutable caller-owned PCM frame as a deterministic source for replay, tests, and transport-independent processing pipelines.

Tag
[Ring 4 / Service] {World: NS}
Since
0.1.0

Definition in file ra8_audio_source_memory.h.

Function Documentation

◆ ra8_audio_source_memory_init()

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 )
nodiscard

Bind one immutable PCM frame as a repeatable audio source.

Parameters
[out]sourceCaller-owned source handle.
[out]stateCaller-owned backend state.
[in]frameValid immutable PCM frame retained by the caller.
Returns
Error code.
Return values
k_ra8_okSource bound.
k_ra8_err_null_ptrAn argument was nullptr.
otherPropagated frame-validation error.
Precondition
frame->data remains readable until the source is stopped.
Postcondition
Captures copy the fixed frame into caller storage.
Note
Not thread-safe with respect to the same state.
Since
0.1.0

Definition at line 126 of file ra8_audio_source_memory.c.

References ra8_audio_source_t::ctx, ra8_audio_source_memory_state_t::frame, ra8_audio_source_t::iface, k_ra8_err_null_ptr, k_ra8_ok, ra8_audio_frame_validate(), and s_memory_source_iface.