Bug 1703 - SDL calls a wrong JNI function on Android by Philipp Wiesemann
authorGabriel Jacobo <gabomdq@gmail.com>
Tue, 12 Feb 2013 13:59:04 -0300
changeset 686497187387ad79
parent 6863 73be5b6b2a86
child 6865 670ebd20759d
Bug 1703 - SDL calls a wrong JNI function on Android by Philipp Wiesemann
src/core/android/SDL_android.cpp
     1.1 --- a/src/core/android/SDL_android.cpp	Mon Feb 11 21:47:13 2013 -0800
     1.2 +++ b/src/core/android/SDL_android.cpp	Tue Feb 12 13:59:04 2013 -0300
     1.3 @@ -430,12 +430,11 @@
     1.4      }
     1.5      Android_JNI_SetupThread();
     1.6  
     1.7 -    
     1.8      __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device");
     1.9      audioBuffer16Bit = is16Bit;
    1.10      audioBufferStereo = channelCount > 1;
    1.11  
    1.12 -    env->CallStaticObjectMethod(mActivityClass, midAudioInit, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames);
    1.13 +    env->CallStaticVoidMethod(mActivityClass, midAudioInit, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames);
    1.14  
    1.15      /* Allocating the audio buffer from the Java side and passing it as the return value for audioInit no longer works on
    1.16       * Android >= 4.2 due to a "stale global reference" error. So now we allocate this buffer directly from this side. */
    1.17 @@ -471,7 +470,7 @@
    1.18      if (audioBufferStereo) {
    1.19          audioBufferFrames /= 2;
    1.20      }
    1.21 - 
    1.22 +
    1.23      return audioBufferFrames;
    1.24  }
    1.25