Commit 9be912c5 by Christoph Wick

fixed android build

parent b73fd6c0
......@@ -235,7 +235,7 @@ public final class MidiInputDevice {
// Don't allocate instances in the loop, as much as possible.
while (!stopFlag) {
length = deviceConnection.bulkTransfer(usbEndpoint, bulkReadBuffer, maxPacketSize, 10);
length = deviceConnection.bulkTransfer(usbEndpoint, bulkReadBuffer, maxPacketSize, 1000);
synchronized (suspendSignal) {
if (suspendFlag) {
......
......@@ -3,13 +3,14 @@
#include <QtCore/private/qjni_p.h>
#include <QtCore/private/qjnihelpers_p.h>
#include <QDebug>
#include <QDateTime>
#include "qandroidmidiplugin.h"
JNIEXPORT void java_midi_sendMidiMessageI(JNIEnv *env, jobject thiz, jstring deviceName, jint byte1) {
Q_UNUSED(env);
Q_UNUSED(thiz);
QVector<quint8> bytes = {static_cast<quint8>(byte1)};
QMidiMessage m(bytes);
QMidiMessage m(bytes, QDateTime::currentMSecsSinceEpoch());
QString name = QAndroidJniObject(deviceName).toString();
#if !defined QT_NO_DEBUG
......@@ -24,7 +25,7 @@ JNIEXPORT void java_midi_sendMidiMessageII(JNIEnv *env, jobject thiz, jstring de
Q_UNUSED(env);
Q_UNUSED(thiz);
QVector<quint8> bytes = {static_cast<quint8>(byte1), static_cast<quint8>(byte2)};
QMidiMessage m(bytes);
QMidiMessage m(bytes, QDateTime::currentMSecsSinceEpoch());
QString name = QAndroidJniObject(deviceName).toString();
#if !defined QT_NO_DEBUG
......@@ -39,7 +40,7 @@ JNIEXPORT void java_midi_sendMidiMessageIII(JNIEnv *env, jobject thiz, jstring d
Q_UNUSED(env);
Q_UNUSED(thiz);
QVector<quint8> bytes = {static_cast<quint8>(byte1), static_cast<quint8>(byte2), static_cast<quint8>(byte3)};
QMidiMessage m(bytes);
QMidiMessage m(bytes, QDateTime::currentMSecsSinceEpoch());
QString name = QAndroidJniObject(deviceName).toString();
#if !defined QT_NO_DEBUG
......@@ -60,7 +61,7 @@ JNIEXPORT void java_midi_sendMidiMessageBytes(JNIEnv *env, jobject thiz, jstring
memcpy(bytes.data(), a, length);
env->ReleaseByteArrayElements(jbytes, a, JNI_ABORT);
QMidiMessage m(bytes);
QMidiMessage m(bytes, QDateTime::currentMSecsSinceEpoch());
QString name = QAndroidJniObject(deviceName).toString();
#if !defined QT_NO_DEBUG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment