|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
Audio graph engine — typed node factories, device configuration helpers, and graph lifecycle (init/build/start/stop/process). More...
Classes | |
| class | Graph |
| C++ wrapper around ove_audio_graph. More... | |
Functions | |
| struct ove_audio_device_cfg | device_cfg_i2s (uint32_t sample_rate, uint32_t channels, uint32_t input_device) |
| Build an audio device config for the I2S transport. | |
Audio graph engine — typed node factories, device configuration helpers, and graph lifecycle (init/build/start/stop/process).
Available when CONFIG_OVE_AUDIO is enabled. The Rust analog is ove::audio and the Zig analog is ove.audio.
|
inline |
Build an audio device config for the I2S transport.
Mirrors ove::audio::device_cfg_i2s in the Rust binding and ove.audio.deviceCfgI2s in the Zig binding. Both of those need pointer-cast tricks to write into the anonymous union of ove_audio_device_cfg; C++ supports anonymous unions natively (cfg.i2s.input_device) so the equivalent here is straightforward.
Sample format defaults to S16. Callers that need TDM slot masking can set cfg.i2s.slot_mask on the returned value.
| sample_rate | Sample rate in Hz (e.g. 16000, 48000). |
| channels | Channel count (1 = mono, 2 = stereo). |
| input_device | Input device selector (e.g. line-in, DMIC index). |
ove_audio_device_cfg ready to pass to Graph::device_source / Graph::device_sink.