oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
Classes | Functions
ove::audio Namespace Reference

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.
 

Detailed Description

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.

Function Documentation

◆ device_cfg_i2s()

struct ove_audio_device_cfg ove::audio::device_cfg_i2s ( uint32_t  sample_rate,
uint32_t  channels,
uint32_t  input_device 
)
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.

Parameters
sample_rateSample rate in Hz (e.g. 16000, 48000).
channelsChannel count (1 = mono, 2 = stereo).
input_deviceInput device selector (e.g. line-in, DMIC index).
Returns
Filled-in ove_audio_device_cfg ready to pass to Graph::device_source / Graph::device_sink.