opensl_latency.cpp 415 B

123456789101112131415161718192021
  1. // This file is NOT part of OpenAL-soft
  2. #include <jni.h>
  3. #include "oboe/Oboe.h"
  4. extern "C"
  5. {
  6. JNIEXPORT void JNICALL
  7. Java_org_love2d_android_GameActivity_nativeSetDefaultStreamValues(
  8. JNIEnv *env,
  9. jclass type,
  10. jint sampleRate,
  11. jint framesPerBurst
  12. ) {
  13. oboe::DefaultStreamValues::SampleRate = (int32_t) sampleRate;
  14. oboe::DefaultStreamValues::FramesPerBurst = (int32_t) framesPerBurst;
  15. }
  16. }