Native MIDI API in Android Q beta 1

118 views
Skip to first unread message

Don Turner

unread,
Mar 15, 2019, 2:19:16 PM3/15/19
to android-midi

Android Q beta 1 has been released and includes a new Native MIDI API for C/C++ apps.


Resources:


We have a very short window during which we can consider API change requests, so please try out this new API, and let us know what you think. For specific bugs, file a bug at the link above. For general comments, you can reply to this thread.


Thank you!


Don (Developer Advocate - Android Audio)

Atsushi Eno

unread,
Apr 20, 2019, 1:58:50 PM4/20/19
to android-midi
Hello,

I had been trying to make use of this new toy in my Fluidsynth Android port (which now has OpenSLES
and Oboe support in master branch) and indeed wrote some code for that. [*1]
But I noticed that this AMidi API is only for "client" app side.

I wanted to have some native support in my MidiDeviceService implementation[*2], but there is no
chance to get MidiDevice from MidiDeviceService and therefore I cannot use the entire AMidi stuff.
To my understanding, it means that I still have to provide MidiReceiver.onSend() implementation based
on Java API and JNI marshaling matters regardless of whether the client is AMidi based or not.

Is this connection via JNI based Service still the best optimal pass with AMidi?

Regardless of that, my piece of code [*2] to skip linking libamidi.so would be useful to anyone.
Feel free to take it away. It's based on the similar manner to what Oboe does wrt AAudio.
(I have to say, it is totally untested because as I wrote above I had no chance to actually use it.)

Atsushi Eno
Reply all
Reply to author
Forward
0 new messages