We'll need to add target_oboetarget directory to roc_sndio with three new classes:
OboeSink
OboeSource
OboeBackend
(or maybe one class OboeDevice instead of two classes OboeSink+OboeSource, like it's done for pulseaudio).
And then we should register OboeBackend in sndio::BackendDispatcher.
Some notes:
we likely should use Oboe callback mode, which provides a lower latency;
we should also implement onErrorAfterClose callback and restart stream if it's disconnected;
we should use oboe::PerformanceMode::LowLatency and oboe::InputPreset::Unprocessed modes;
we should ensure to perform resampling only once: either in Oboe or in Roc; so if resampling is enabled in Roc, it should be disabled in Oboe, and vice versa.
Testing
Backend can be tested manually by building roc-send and roc-recv for Android and uploading binaries via adb.
Summary
Add implementations of sndio::ISink, sndio::ISource, and sndio::IBackend using Oboe library (low-latency audio I/O for Android).
The implementation would be similar to pulseaudio backend: roc_sndio/target_pulseaudio.
This page provides more info on audio backends in roc: https://roc-streaming.org/toolkit/docs/internals/audio_backends.html
Implementation
We'll need to add
target_oboe
target directory to roc_sndio with three new classes:(or maybe one class OboeDevice instead of two classes OboeSink+OboeSource, like it's done for pulseaudio).
And then we should register OboeBackend in sndio::BackendDispatcher.
Some notes:
Testing
Backend can be tested manually by building roc-send and roc-recv for Android and uploading binaries via adb.
https://roc-streaming.org/toolkit/docs/tools/command_line_tools.html