visualtest/testsprite2_sample.parameters
author Sam Lantinga <slouken@libsdl.org>
Tue, 25 Sep 2018 20:08:51 -0700
changeset 12224 0582b4e1fa9f
parent 7924 fcb86d323770
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);
}
icculus@7924
     1
# parameter name, type, value range, required, categories
icculus@7924
     2
--gldebug, boolean, [], false, []
icculus@7924
     3
--info, enum, [all video modes render event], false, []
icculus@7924
     4
--log, enum, [all error system audio video render input], false, []
icculus@7924
     5
--display, integer, [1 5], false, []
icculus@7924
     6
--fullscreen, boolean, [], false, []
icculus@7924
     7
--fullscreen-desktop, boolean, [], false, []
icculus@7924
     8
# --windows, integer, [1 5], false, [] # this option is not supported yet
icculus@7924
     9
--title, enum, [vartest bartest footest], false, []
icculus@7924
    10
--icon, enum, [icon.bmp], false, []
icculus@7924
    11
--center, boolean, [], false, []
icculus@7924
    12
--position, enum, [300,300], false, []
icculus@7924
    13
--geometry, enum, [500x500], false, []
icculus@7924
    14
--min-geometry, enum, [100x100], false, []
icculus@7924
    15
--max-geometry, enum, [600x600 700x700], false, []
icculus@7924
    16
--logical, enum, [500x500 550x450], false, []
icculus@7924
    17
--scale, integer, [1 5], false, []
icculus@7924
    18
--depth, integer, [1 5], false, []
icculus@7924
    19
--refresh, integer, [1 5], false, []
icculus@7924
    20
--vsync, boolean, [], false, []
icculus@7924
    21
--noframe, boolean, [], false, []
icculus@7924
    22
--resize, boolean, [], false, []
icculus@7924
    23
--minimize, boolean, [], false, []
icculus@7924
    24
--maximize, boolean, [], false, []
icculus@7924
    25
--grab, boolean, [], false, [mouse]
icculus@7924
    26
--blend, enum, [none blend add mod], false, []
icculus@7924
    27
--cyclecolor, boolean, [], false, []
icculus@7924
    28
--cyclealpha, boolean, [], false, []
icculus@7924
    29
--iterations, integer, [10 100], false, []