oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
Audio node types and built-in factories

Core types for audio nodes, formats, buffers, and built-in processor node factories. More...

Collaboration diagram for Audio node types and built-in factories:

Data Structures

struct  ove_audio_fmt
 Complete audio stream format descriptor. More...
 
struct  ove_audio_buf
 Audio buffer passed between nodes during graph processing. More...
 
struct  ove_audio_node_ops
 Virtual function table (vtable) for an audio processing node. More...
 
struct  ove_audio_node
 Descriptor for a single node in the audio graph. More...
 
struct  ove_audio_channel_map
 Channel routing table used by ove_audio_node_channel_map(). More...
 

Macros

#define OVE_AUDIO_MAX_CHANNELS   8
 Maximum number of audio channels supported by the channel-map node.
 

Typedefs

typedef void(* ove_audio_tap_fn) (const struct ove_audio_buf *buf, void *user_data)
 Callback invoked by the tap node for every processed buffer.
 

Enumerations

enum  ove_audio_sample_fmt { OVE_AUDIO_FMT_S16 , OVE_AUDIO_FMT_S32 , OVE_AUDIO_FMT_F32 }
 PCM sample format tag. More...
 
enum  ove_audio_node_type { OVE_AUDIO_NODE_SOURCE , OVE_AUDIO_NODE_PROCESSOR , OVE_AUDIO_NODE_SINK }
 Role of a node within the audio graph. More...
 

Functions

static unsigned int ove_audio_sample_size (enum ove_audio_sample_fmt fmt)
 Return the size in bytes of one sample for a given format.
 
static int ove_audio_fmt_equal (const struct ove_audio_fmt *a, const struct ove_audio_fmt *b)
 Test two format descriptors for equality.
 

Detailed Description

Core types for audio nodes, formats, buffers, and built-in processor node factories.

Defines the fundamental data types shared by every node in the audio graph: sample format, format descriptor, audio buffer, node vtable, and node descriptor. Also provides a small set of ready-made processor node factories (format converter, channel mapper, gain, and tap observer).

Note
Requires CONFIG_OVE_AUDIO.

Typedef Documentation

◆ ove_audio_tap_fn

typedef void(* ove_audio_tap_fn) (const struct ove_audio_buf *buf, void *user_data)

Callback invoked by the tap node for every processed buffer.

Parameters
[in]bufBuffer containing the observed audio data.
[in]user_dataOpaque pointer supplied at node creation.

Enumeration Type Documentation

◆ ove_audio_sample_fmt

PCM sample format tag.

Identifies the numeric type and bit-depth of each audio sample.

Enumerator
OVE_AUDIO_FMT_S16 

Signed 16-bit integer (int16_t).

OVE_AUDIO_FMT_S32 

Signed 32-bit integer (int32_t).

OVE_AUDIO_FMT_F32 

32-bit IEEE 754 float.

◆ ove_audio_node_type

Role of a node within the audio graph.

Enumerator
OVE_AUDIO_NODE_SOURCE 

Produces audio; has no upstream connection.

OVE_AUDIO_NODE_PROCESSOR 

Transforms audio; has one upstream connection.

OVE_AUDIO_NODE_SINK 

Consumes audio; has no downstream connection.

Function Documentation

◆ ove_audio_sample_size()

static unsigned int ove_audio_sample_size ( enum ove_audio_sample_fmt  fmt)
inlinestatic

Return the size in bytes of one sample for a given format.

Parameters
[in]fmtSample format tag.
Returns
Byte size of one sample, or 0 for an unrecognised format.

◆ ove_audio_fmt_equal()

static int ove_audio_fmt_equal ( const struct ove_audio_fmt a,
const struct ove_audio_fmt b 
)
inlinestatic

Test two format descriptors for equality.

Parameters
[in]aFirst format descriptor.
[in]bSecond format descriptor.
Returns
Non-zero if all fields match, zero otherwise.