Add Android AMY Oboe service over private Unix socket - #3
Draft
linuxificator wants to merge 47 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a private Linux/Android Unix-domain AMY transport plus a generic Android AAR that runs AMY + Oboe in an unexported
:amyservice process. Any Android client packaged with the AAR can control the synth through the private AMY wire socket; the AMY Android layer has no dependency on a particular UI toolkit or application framework.Private transport
AF_UNIX+SOCK_SEQPACKET0600SO_PEERCREDsame-UID checkThe receiver thread never calls AMY. The audio/control owner explicitly drains packets at a safe AMY block boundary.
Android AMY/Oboe AAR
android/org.amy.audio.AmyServiceandroid:process=":amy", so it shares the host application UID but has a separate process/runtime<Context.getFilesDir()>/amy.sockamy.sockAF_UNIX/SOCK_SEQPACKETLowLatency,Exclusivearm64-v8aClient contract
A host Android application needs only to package the AAR, start
AmyService, determine its privatefilesDir, connect to<filesDir>/amy.sock, and send one ordinary AMY wire message perSOCK_SEQPACKETpacket. The socket is bidirectional for replies/status. No AMY-specific JNI calls are required for musical control.The pathname is intended to be a readiness boundary: the service publishes/listens on
amy.sockonly after Oboe has started and its realtime callback has executed at least once. A client can therefore retryconnect()until the socket exists/accepts and then begin sending AMY wire packets without an application-specific startup delay.Build/test
bash tests/run_amy_unix_socket_test.sh.github/workflows/android-unix-socket.ymlvalidates the private Unix socket transport.github/workflows/android.ymlvalidates the socket path and builds the complete Android AAR with JDK 17 / API 36 / NDK 27 / CMake 3.22 / Gradle 8.13amy-service-debug-aarScope / hardware follow-up