acinclude/ltversion.m4
author Sam Lantinga <slouken@libsdl.org>
Tue, 25 Sep 2018 20:08:51 -0700
changeset 12224 0582b4e1fa9f
parent 6442 2d3caa191dc4
permissions -rw-r--r--
Fixed bug 4268 - Android_JNI_OpenAudioDevice function has error

alittle

where iscapture == 1

1.param set error

(*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureOpen, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames)

param:audioBuffer16Bit need change to captureBuffer16Bit

2.logic error

if (is16Bit) {
// ALITTLE Modify the source code
if (iscapture) {
audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)captureBuffer);
} else {
audioBufferPinned = (*env)->GetShortArrayElements(env, (jshortArray)audioBuffer, &isCopy);
audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)audioBuffer);
}
// if (!iscapture) {
// audioBufferPinned = (*env)->GetShortArrayElements(env, (jshortArray)audioBuffer, &isCopy);
// }
// audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)audioBuffer);
} else {
// ALITTLE Modify the source code
if (iscapture) {
audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)captureBuffer);
} else {
audioBufferPinned = (*env)->GetByteArrayElements(env, (jbyteArray)audioBuffer, &isCopy);
audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)audioBuffer);
}
// if (!iscapture) {
// audioBufferPinned = (*env)->GetByteArrayElements(env, (jbyteArray)audioBuffer, &isCopy);
// }
// audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)audioBuffer);
}
     1 # ltversion.m4 -- version numbers			-*- Autoconf -*-
     2 #
     3 #   Copyright (C) 2004 Free Software Foundation, Inc.
     4 #   Written by Scott James Remnant, 2004
     5 #
     6 # This file is free software; the Free Software Foundation gives
     7 # unlimited permission to copy and/or distribute it, with or without
     8 # modifications, as long as this notice is preserved.
     9 
    10 # @configure_input@
    11 
    12 # serial 3337 ltversion.m4
    13 # This file is part of GNU Libtool
    14 
    15 m4_define([LT_PACKAGE_VERSION], [2.4.2])
    16 m4_define([LT_PACKAGE_REVISION], [1.3337])
    17 
    18 AC_DEFUN([LTVERSION_VERSION],
    19 [macro_version='2.4.2'
    20 macro_revision='1.3337'
    21 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
    22 _LT_DECL(, macro_revision, 0)
    23 ])