src/core/android/SDL_android.c
changeset 12387 2f02c753a5dc
parent 12381 dc9108cd4340
child 12464 db15b3c90139
equal deleted inserted replaced
12386:a80816d0e9d2 12387:2f02c753a5dc
  1259 
  1259 
  1260 int Android_JNI_CaptureAudioBuffer(void *buffer, int buflen)
  1260 int Android_JNI_CaptureAudioBuffer(void *buffer, int buflen)
  1261 {
  1261 {
  1262     JNIEnv *env = Android_JNI_GetEnv();
  1262     JNIEnv *env = Android_JNI_GetEnv();
  1263     jboolean isCopy = JNI_FALSE;
  1263     jboolean isCopy = JNI_FALSE;
  1264     jint br;
  1264     jint br = -1;
  1265 
  1265 
  1266     switch (captureBufferFormat) {
  1266     switch (captureBufferFormat) {
  1267     case ENCODING_PCM_8BIT:
  1267     case ENCODING_PCM_8BIT:
  1268         SDL_assert((*env)->GetArrayLength(env, (jshortArray)captureBuffer) == buflen);
  1268         SDL_assert((*env)->GetArrayLength(env, (jshortArray)captureBuffer) == buflen);
  1269         br = (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadByteBuffer, (jbyteArray)captureBuffer, JNI_TRUE);
  1269         br = (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadByteBuffer, (jbyteArray)captureBuffer, JNI_TRUE);