docs/README.md
author Sam Lantinga <slouken@libsdl.org>
Tue, 25 Sep 2018 20:08:51 -0700
changeset 12224 0582b4e1fa9f
parent 10811 8dd0da2a25b6
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);
}
slouken@10486
     1
Simple DirectMedia Layer {#mainpage}
slouken@10486
     2
========================
slouken@10486
     3
slouken@10486
     4
                                  (SDL)
slouken@10486
     5
slouken@10486
     6
                                Version 2.0
slouken@10486
     7
slouken@10486
     8
---
slouken@10486
     9
http://www.libsdl.org/
slouken@10486
    10
slouken@10486
    11
Simple DirectMedia Layer is a cross-platform development library designed
slouken@10486
    12
to provide low level access to audio, keyboard, mouse, joystick, and graphics
slouken@10486
    13
hardware via OpenGL and Direct3D. It is used by video playback software,
slouken@10486
    14
emulators, and popular games including Valve's award winning catalog
slouken@10486
    15
and many Humble Bundle games.
slouken@10486
    16
slouken@10486
    17
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
slouken@10486
    18
Support for other platforms may be found in the source code.
slouken@10486
    19
slouken@10486
    20
SDL is written in C, works natively with C++, and there are bindings 
slouken@10486
    21
available for several other languages, including C# and Python.
slouken@10486
    22
slouken@10486
    23
This library is distributed under the zlib license, which can be found
slouken@10486
    24
in the file "COPYING.txt".
slouken@10486
    25
slouken@10486
    26
The best way to learn how to use SDL is to check out the header files in
slouken@10486
    27
the "include" subdirectory and the programs in the "test" subdirectory.
slouken@10486
    28
The header files and test programs are well commented and always up to date.
slouken@10486
    29
slouken@10486
    30
More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/)
slouken@10486
    31
slouken@10486
    32
- [Android](README-android.md)
slouken@10486
    33
- [CMake](README-cmake.md)
slouken@10486
    34
- [DirectFB](README-directfb.md)
slouken@10486
    35
- [DynAPI](README-dynapi.md)
slouken@10486
    36
- [Emscripten](README-emscripten.md)
slouken@10486
    37
- [Gesture](README-gesture.md)
slouken@10486
    38
- [Mercurial](README-hg.md)
slouken@10486
    39
- [iOS](README-ios.md)
slouken@10486
    40
- [Linux](README-linux.md)
slouken@10486
    41
- [OS X](README-macosx.md)
slouken@10486
    42
- [Native Client](README-nacl.md)
slouken@10486
    43
- [Pandora](README-pandora.md)
slouken@10486
    44
- [Supported Platforms](README-platforms.md)
slouken@10486
    45
- [Porting information](README-porting.md)
slouken@10486
    46
- [PSP](README-psp.md)
slouken@10486
    47
- [Raspberry Pi](README-raspberrypi.md)
slouken@10486
    48
- [Touch](README-touch.md)
slouken@10486
    49
- [WinCE](README-wince.md)
slouken@10486
    50
- [Windows](README-windows.md)
slouken@10486
    51
- [WinRT](README-winrt.md)
slouken@10486
    52
slouken@10486
    53
If you need help with the library, or just want to discuss SDL related
slouken@10486
    54
issues, you can join the [developers mailing list](http://www.libsdl.org/mailing-list.php)
slouken@10486
    55
slouken@10486
    56
If you want to report bugs or contribute patches, please submit them to
philipp@10811
    57
[bugzilla](https://bugzilla.libsdl.org/)
slouken@10486
    58
slouken@10486
    59
Enjoy!
slouken@10486
    60
slouken@10486
    61
slouken@10486
    62
Sam Lantinga <mailto:slouken@libsdl.org>
slouken@10486
    63