-
Notifications
You must be signed in to change notification settings - Fork 283
Android Oboe support (2) #423
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
Conversation
|
Why is this a draft? Do you want to (first) create a PR in pd-for-android that uses this commit? |
First, I wanted we discuss and decide which way is better. Also, I wanted to test some other additions, mainly getter and setter for buffersize, latency and xruns. Then I'll prepare a PR for updating pd-for-android. |
|
So I've added a getter for runtime info from the audio implementation. With Oboe, this can be used to detect xruns, or query the latency, for example for abl_link fine tuning purpose. The PR for pd-for-android is ready (libpd/pd-for-android#173). I think that's enough for me now, ready for review! |
|
Looks good to me. The only detail I can think of is perhaps naming "inputDeviceId" / "outputDeviceId" without the "id" naming ala "inputDevice" but I assume this is a convention used by Oboe / Android and, if so, let's keep it. |
|
yes, the naming in Oboe is AudioStreamBuilder * oboe::AudioStreamBuilder::setDeviceId (int32_t deviceId)(see https://google.github.io/oboe/classoboe_1_1_audio_stream_builder.html#a69c0a23e7ef57bced029ef2193cfe741) AudioDeviceInfo.getId(); // The internal device ID.(see https://developer.android.com/reference/android/media/AudioDeviceInfo#getId()) |
|
Ping @joebowbeer |
|
Re. naming, if the single parameter is an 'id' then the method name should be an 'id' I don't see any red flags, so LGTM. I do wish there were more automated checks in this repo: build everything incl. Java, lint, unit test, smoke test (e2e). That would give me more confidence as a reviewer. I also suggest protecting the master branch. |
I am pretty behind with any CI stuff. Feel free to make a PR to the yaml. |
This implements the native interface for the Oboe audio driver library.
It takes care of the buffer size conversion between Pd and Oboe, separately for input and output (since Oboe can provide less input samples than output ones, mainly on start).
The new
pdnativeoboe.sois now loaded by PdBase loader when on Android, replacing the previouspdnativeopensl.so.Closes #284.
This PR is similar to #422, but involves less change in the Java API.