Browse Source

fixup! reapply love-specific patches to OpenAL-Soft

Sasha Szpakowski 7 months ago
parent
commit
8830ab01fe
1 changed files with 21 additions and 0 deletions
  1. 21 0
      libs/openal-soft/opensl_latency.cpp

+ 21 - 0
libs/openal-soft/opensl_latency.cpp

@@ -0,0 +1,21 @@
+// This file is NOT part of OpenAL-soft
+
+#include <jni.h>
+
+#include "oboe/Oboe.h"
+
+extern "C"
+{
+
+JNIEXPORT void JNICALL
+Java_org_love2d_android_GameActivity_nativeSetDefaultStreamValues(
+    JNIEnv *env,
+    jclass type,
+    jint sampleRate,
+    jint framesPerBurst
+) {
+    oboe::DefaultStreamValues::SampleRate = (int32_t) sampleRate;
+    oboe::DefaultStreamValues::FramesPerBurst = (int32_t) framesPerBurst;
+}
+
+}