Mac and Linux SDL2 binary snapshots
Edward Rudd
2020-05-02 03f8528315fa46c95991a34f3325d7b33ae5538c
source/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java
@@ -73,7 +73,7 @@
            sampleSize = 2;
            break;
        }
        if (isCapture) {
            switch (desiredChannels) {
            case 1:
@@ -298,7 +298,7 @@
            Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
            return;
        }
        for (int i = 0; i < buffer.length; ) {
            int result = mAudioTrack.write(buffer, i, buffer.length - i);
            if (result > 0) {
@@ -364,5 +364,24 @@
        }
    }
    /** This method is called by SDL using JNI. */
    public static void audioSetThreadPriority(boolean iscapture, int device_id) {
        try {
            /* Set thread name */
            if (iscapture) {
                Thread.currentThread().setName("SDLAudioC" + device_id);
            } else {
                Thread.currentThread().setName("SDLAudioP" + device_id);
            }
            /* Set thread priority */
            android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_AUDIO);
        } catch (Exception e) {
            Log.v(TAG, "modify thread properties failed " + e.toString());
        }
    }
    public static native int nativeSetupJNI();
}