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

Added Android support to rtmidi #315

Merged
merged 7 commits into from
Jul 4, 2023
Merged

Conversation

YellowLabrador
Copy link
Contributor

@YellowLabrador YellowLabrador commented May 22, 2023

This is the Android support for rtmidi. I tested the implementation using the rtmidi API and confirmed it works.

One caveat is that the single Java class in contrib/java must be included in the final Android application. That class is instantiated and managed by the C++ code but unfortunately it is required by the Android Midi API. Otherwise an Android app should use the regular rtmidi API, no need to deal with Java at all.

The command below is an example on how to build rtmidi with Android support. It targets the SDK API level 32 and generates arm64 binaries.

cmake .. -B arm64 --toolchain <android sdk>/ndk/<ndk version>/build/cmake/android.toolchain.cmake -DANDROID_NDK=<android sdk>/ndk/<ndk version> -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-32 -DANDROID=32 -DANDROID_STL=c++_shared -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=FALSE

@ebellumat
Copy link

OMG, i really really need this. Why this was not mergerd yet?

@YellowLabrador
Copy link
Contributor Author

Looks like other pull requests were merged before mine and there are merge conflicts. The build failures have nothing to do with this pull request though.

@YellowLabrador
Copy link
Contributor Author

@garyscavone Can you try to merge it again?

@garyscavone
Copy link
Contributor

Can you revise it to put the ANDROID enum at the end of the list? That is what we have been doing with new APIs.

@YellowLabrador
Copy link
Contributor Author

Sure, done.

@YellowLabrador
Copy link
Contributor Author

@garyscavone I updated (and aligned) the enums.

@garyscavone garyscavone merged commit 6c5953b into thestk:master Jul 4, 2023
5 checks passed
@ebellumat
Copy link

You guys rock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants