|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
C++ wrapper around ove_audio_graph. More...
#include <audio.hpp>
Public Member Functions | |
| int | init (unsigned int frames_per_period) |
| Initialise the audio graph with the given period size. | |
| int | add_node (const struct ove_audio_node_ops *ops, void *ctx, const char *name, enum ove_audio_node_type type) |
| Add a processing node to the graph. | |
| int | connect (unsigned int from, unsigned int to) |
Connect two nodes (output of from to input of to). | |
| int | build () |
| Finalize the graph topology. | |
| int | start () |
| Start audio processing. | |
| int | stop () |
| Stop audio processing. | |
| int | process () |
| Run one processing period through the graph. | |
| int | get_stats (struct ove_audio_graph_stats *stats) const |
| Query runtime statistics. | |
| int | device_source (const struct ove_audio_device_cfg *cfg, const char *name) |
| Add an audio input device as a source node. | |
| int | device_sink (const struct ove_audio_device_cfg *cfg, const char *name) |
| Add an audio output device as a sink node. | |
| struct ove_audio_graph * | raw () |
| Access the underlying C graph struct. | |
| template<typename T > | |
| int | add_processor (T &node, const char *name) |
C++ wrapper around ove_audio_graph.
Provides RAII-style init/deinit and forwarding to the C graph API.
|
inline |
Register a custom processor node using a typed C++ object.
T must have: int process(const ove_audio_buf *in, ove_audio_buf *out) The binding layer generates trampolines — no raw function pointers needed.