Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ISink and ISource for Android using Oboe #741

Open
gavv opened this issue Jun 23, 2024 · 0 comments
Open

Implement ISink and ISource for Android using Oboe #741

gavv opened this issue Jun 23, 2024 · 0 comments
Labels
android Android-related tasks enhancement help wanted An important and awaited task but we have no human resources for it yet sound io Audio I/O

Comments

@gavv
Copy link
Member

gavv commented Jun 23, 2024

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:

  • 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.

https://roc-streaming.org/toolkit/docs/tools/command_line_tools.html

@gavv gavv added enhancement help wanted An important and awaited task but we have no human resources for it yet android Android-related tasks sound io Audio I/O labels Jun 23, 2024
@gavv gavv added this to Roc Toolkit Jul 6, 2024
@gavv gavv moved this to Help wanted in Roc Toolkit Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Android-related tasks enhancement help wanted An important and awaited task but we have no human resources for it yet sound io Audio I/O
Projects
Status: Help wanted
Development

No branches or pull requests

1 participant