roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.02k stars 203 forks source link

Implement ISink and ISource for Android using Oboe #741

Open gavv opened 1 week ago

gavv commented 1 week ago

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