oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
Data Fields
ove_audio_node_ops Struct Reference

Virtual function table (vtable) for an audio processing node. More...

#include <audio_node.h>

Data Fields

int(* configure )(void *ctx, const struct ove_audio_fmt *in_fmt, struct ove_audio_fmt *out_fmt)
 Negotiate format during graph build (topological order).
 
int(* start )(void *ctx)
 Start the node (called on graph start). NULL = no-op.
 
int(* stop )(void *ctx)
 Stop the node (called on graph stop). NULL = no-op.
 
int(* process )(void *ctx, const struct ove_audio_buf *in, struct ove_audio_buf *out)
 Process one buffer period.
 
void(* destroy )(void *ctx)
 Release all resources owned by the node context.
 

Detailed Description

Virtual function table (vtable) for an audio processing node.

Each node kind implements a subset of these callbacks. NULL pointers are treated as no-ops by the graph engine (except process, which must be provided).

Field Documentation

◆ configure

int(* ove_audio_node_ops::configure) (void *ctx, const struct ove_audio_fmt *in_fmt, struct ove_audio_fmt *out_fmt)

Negotiate format during graph build (topological order).

Called once per node during ove_audio_graph_build().

  • Sources: in_fmt is NULL; the node must fill out_fmt from its internal configuration.
  • Processors: receive upstream in_fmt; must fill out_fmt.
  • Sinks: receive upstream in_fmt; out_fmt is NULL; validate input and return an error if the format is unsupported.
Parameters
[in]ctxNode context pointer supplied at registration.
[in]in_fmtUpstream output format, or NULL for sources.
[out]out_fmtFormat this node will produce, or NULL for sinks.
Returns
0 on success, negative error code on failure.

◆ start

int(* ove_audio_node_ops::start) (void *ctx)

Start the node (called on graph start). NULL = no-op.

Parameters
[in]ctxNode context pointer.
Returns
0 on success, negative error code on failure.

◆ stop

int(* ove_audio_node_ops::stop) (void *ctx)

Stop the node (called on graph stop). NULL = no-op.

Parameters
[in]ctxNode context pointer.
Returns
0 on success, negative error code on failure.

◆ process

int(* ove_audio_node_ops::process) (void *ctx, const struct ove_audio_buf *in, struct ove_audio_buf *out)

Process one buffer period.

Called in topological order each graph cycle:

  • Sources: in is NULL; the node must fill out.
  • Processors: read from in, write to out (separate buffers).
  • Sinks: read from in; out is NULL.
Parameters
[in]ctxNode context pointer.
[in]inInput buffer, or NULL for sources.
[out]outOutput buffer to fill, or NULL for sinks.
Returns
0 on success, negative error code on failure.

◆ destroy

void(* ove_audio_node_ops::destroy) (void *ctx)

Release all resources owned by the node context.

Called when the node is removed from the graph. May be NULL.

Parameters
[in]ctxNode context pointer.

The documentation for this struct was generated from the following file: