Commit Graph

7 Commits

Author SHA1 Message Date
Mikhail Naganov
25f51c6ab9 NativeMIDI: Fix access to unaligned 64-bit data
Accessing unaligned 64-bit data in 32-bit ARM code leads
to SIGBUS / BUS_ADRALN fault. Since the timestamp position
in the message buffer is arbitrary, use memcpy to copy
it to the output argument.

Bug: 114123427
Test: 32-bit android.nativemidi.cts.NativeMidiEchoTest
Change-Id: I0cb08cb0b124e3f4a05ea19bf91f40081a584a2e
2018-11-07 09:41:45 -08:00
Elliott Hughes
c73a4671dd Add __INTRODUCED_IN annotations to <amidi/midi.h>.
Bug: https://github.com/android-ndk/ndk/issues/706
Test: builds
Change-Id: I3f68f1e7c407b1208e943d15f74a9f32846a04b6
2018-06-18 12:17:17 -07:00
Paul McLean
84b49130ff Moving native MIDI JNI init to AndroidRuntime.cpp.
Remove (non-working) lazy init in midi.cpp

Bug: 79464070
Test: Verify function with NativeMidiTestbed app.
Change-Id: I30182d19d205b4ab952d622824f1a63ab1fef72e
2018-05-11 09:10:38 -07:00
Paul McLean
8a3e33b36a (re)integrating Native MIDI API into NDK - base API
Implement native MIDI API (amidi)

Bug: 30252756
Bug: 37090545

Test: manual - Connect PreSonus AudioBox 22VSL and run tests in NativeMidiTestbed app.
Verify MIDI messages sent to external MIDI synthesizer.
Verify MIDI messages received from external MIDI synthesizer.
CTS

Change-Id: I7bb02b8926d01090132ce873c785b5323a9fa5f8
2018-03-15 16:20:07 -07:00
Colin Cross
76de4f6b4d Convert libmedia_jni to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
2017-05-16 13:07:57 -07:00
Paul McLean
71f672b98a Switching Native MIDI API to an "opaque pointers" model.
Test: manual

Change-Id: Ic181008427e6e81106d867cc3a70deef8c591841
2017-03-10 15:54:16 -07:00
Mikhail Naganov
c276c59eb5 nativemidi: Prototype demonstrating native access to IMidiDeviceServer
Framework changes and a demo app
Comment and finalized Native MIDI API
Replaced fixed PortRegistry tables with std::map.
more error handling.
Removed not-very-useful MidiDeviceManager class.
Made Java API functions @hide.

Bug: 30252756

Test: Manual
Change-Id: Iae98e589f38ef6d625ff0842401193fe98c5d881
2017-03-03 12:00:33 -07:00