|
oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
|
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. | |
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).
| 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().
in_fmt is NULL; the node must fill out_fmt from its internal configuration.in_fmt; must fill out_fmt.in_fmt; out_fmt is NULL; validate input and return an error if the format is unsupported.| [in] | ctx | Node context pointer supplied at registration. |
| [in] | in_fmt | Upstream output format, or NULL for sources. |
| [out] | out_fmt | Format this node will produce, or NULL for sinks. |
| int(* ove_audio_node_ops::start) (void *ctx) |
Start the node (called on graph start). NULL = no-op.
| [in] | ctx | Node context pointer. |
| int(* ove_audio_node_ops::stop) (void *ctx) |
Stop the node (called on graph stop). NULL = no-op.
| [in] | ctx | Node context pointer. |
| 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:
in is NULL; the node must fill out.in, write to out (separate buffers).in; out is NULL.| [in] | ctx | Node context pointer. |
| [in] | in | Input buffer, or NULL for sources. |
| [out] | out | Output buffer to fill, or NULL for sinks. |
| 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.
| [in] | ctx | Node context pointer. |