简体   繁体   English

适用于Android的USB Midi驱动程序崩溃

[英]USB Midi driver for Android crashes

I am trying to use this USB-MIDI-Driver https://github.com/kshoji/USB-MIDI-Driver in my project. 我正在我的项目中尝试使用此USB-MIDI-Driver https://github.com/kshoji/USB-MIDI-Driver I added the driver using gradle, 我使用gradle添加了驱动程序,

maven {url 'https://github.com/kshoji/USB-MIDI-Driver/raw/master/MIDIDriver/snapshots'}
...
compile 'jp.kshoji:midi-driver:0.1.1:@aar'

copied the sample ( https://github.com/kshoji/USB-MIDI-Driver/blob/master/MIDIDriverSample/src/jp/kshoji/driver/midi/sample/UsbMidiDriverSampleActivity.java ), removed the "play audio" part and started the activity from my MainActivity. 复制了样本( https://github.com/kshoji/USB-MIDI-Driver/blob/master/MIDIDriverSample/src/jp/kshoji/driver/midi/sample/UsbMidiDriverSampleActivity.java ),删除了“播放音频”部分然后从我的MainActivity开始了活动。

My problem is, that with time it gets slower and slower, it misses events, I skip frames, the ui becomes unresponsive, the device is detatched and my app crashes more or less... The pre-compiled project from Google Play Market works fine though. 我的问题是,随着时间变得越来越慢,它会错过事件,我跳过帧,UI变得无响应,设备被分离并且我的应用程序崩溃或多或少... Google Play Market的预编译项目有效很好。

The only thing I can think of is that I use the wrong version of the driver or sample... Is there anyone who had a similar problem and can help me? 我唯一能想到的是我使用了错误版本的驱动程序或示例……是否有人遇到类似的问题并且可以帮助我?

I did not really find an answer but followed kshojis comment in Send MIDI messages over USB on Android and tried the alternative driver he suggests ( http://www.humatic.de/htools/nmj/ ). 我没有真正找到答案,而是在Android上通过USB发送MIDI消息中的 kshojis注释中进行尝试,并尝试了他建议的替代驱动程序( http://www.humatic.de/htools/nmj/ )。

nmj seems to use much less resources but requires you to interpret midi-events. nmj似乎使用的资源要少得多,但需要您解释Midi事件。 http://www.petesqbsite.com/sections/express/issue18/midifilespart1.html is a nice resource on how to read midi. http://www.petesqbsite.com/sections/express/issue18/midifilespart1.html是有关如何阅读midi的不错资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM