├── .gitignore ├── .gitmodules ├── .travis.yml ├── README.md ├── app ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ ├── 9_ufo-patch.zip │ ├── 9_ufo-patch.zip.MD5 │ ├── z_nomedia.zip │ └── z_nomedia.zip.MD5 │ ├── java │ ├── ar │ │ └── com │ │ │ └── daidalos │ │ │ └── afiledialog │ │ │ ├── FileChooser.java │ │ │ ├── FileChooserActivity.java │ │ │ ├── FileChooserCore.java │ │ │ ├── FileChooserDialog.java │ │ │ ├── FileChooserLabels.java │ │ │ └── view │ │ │ └── FileItem.java │ └── org │ │ └── libsdl │ │ ├── app │ │ └── SDLActivity.java │ │ └── openxcom │ │ ├── DirsConfigActivity.java │ │ ├── OpenXcom.java │ │ ├── PreloaderActivity.java │ │ ├── UiVisibilityChanger.java │ │ ├── config │ │ ├── Config.java │ │ ├── DataCheckResult.java │ │ ├── DataChecker.java │ │ ├── Xcom1DataChecker.java │ │ └── Xcom2DataChecker.java │ │ └── util │ │ └── FilesystemHelper.java │ ├── jni │ ├── CMakeLists.txt │ ├── deps_cmake │ │ ├── libmad.cmake │ │ ├── sdl.cmake │ │ ├── sdl2_image.cmake │ │ ├── sdl2_mixer.cmake │ │ ├── sdl_gfx.cmake │ │ └── yaml-cpp.cmake │ ├── libmad-0.15.1b │ │ ├── CHANGES │ │ ├── COPYING │ │ ├── COPYRIGHT │ │ ├── CREDITS │ │ ├── D.dat │ │ ├── INSTALL │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── README │ │ ├── TODO │ │ ├── VERSION │ │ ├── aclocal.m4 │ │ ├── bit.c │ │ ├── bit.h │ │ ├── config.guess │ │ ├── config.h │ │ ├── config.h.in │ │ ├── config.status │ │ ├── config.sub │ │ ├── configure │ │ ├── configure.ac │ │ ├── decoder.c │ │ ├── decoder.h │ │ ├── depcomp │ │ ├── fixed.c │ │ ├── fixed.h │ │ ├── frame.c │ │ ├── frame.h │ │ ├── global.h │ │ ├── huffman.c │ │ ├── huffman.h │ │ ├── imdct_l_arm.S │ │ ├── imdct_s.dat │ │ ├── install-sh │ │ ├── layer12.c │ │ ├── layer12.h │ │ ├── layer3.c │ │ ├── layer3.h │ │ ├── libmad.list │ │ ├── libmad.list.in │ │ ├── libtool │ │ ├── ltmain.sh │ │ ├── mad.h │ │ ├── mad.h.sed │ │ ├── minimad.c │ │ ├── missing │ │ ├── mkinstalldirs │ │ ├── msvc++ │ │ │ ├── Makefile │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── config.h │ │ │ ├── libmad.dsp │ │ │ └── mad.h │ │ ├── qc_table.dat │ │ ├── rq_table.dat │ │ ├── sf_table.dat │ │ ├── stamp-h1 │ │ ├── stream.c │ │ ├── stream.h │ │ ├── synth.c │ │ ├── synth.h │ │ ├── timer.c │ │ ├── timer.h │ │ ├── version.c │ │ ├── version.h │ │ └── version.loT │ └── src │ │ ├── SDL_android_main.c │ │ └── libflac_cfg │ │ └── config.h │ └── res │ ├── drawable-hdpi │ ├── add.png │ ├── document.png │ ├── document_gray.png │ ├── folder.png │ ├── ic_launcher.png │ ├── no.png │ └── tick.png │ ├── drawable-mdpi │ ├── add.png │ ├── document.png │ ├── document_gray.png │ ├── folder.png │ ├── ic_launcher.png │ ├── no.png │ └── tick.png │ ├── drawable-xhdpi │ └── ic_launcher.png │ ├── drawable-xxhdpi │ └── ic_launcher.png │ ├── layout │ ├── activity_dirs_config.xml │ ├── activity_preloader.xml │ ├── daidalos_file_chooser.xml │ ├── daidalos_file_item.xml │ └── main.xml │ ├── values-en │ └── strings.xml │ ├── values-ru │ └── strings.xml │ └── values │ └── strings.xml ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── import-summary.txt ├── openxcom_studio.iml ├── private.enc └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | ### Android template 3 | # Built application files 4 | *.apk 5 | *.ap_ 6 | 7 | # Files for the Dalvik VM 8 | *.dex 9 | 10 | # Java class files 11 | *.class 12 | 13 | # Generated files 14 | bin/ 15 | gen/ 16 | 17 | # Gradle files 18 | .gradle/ 19 | build/ 20 | /*/build/ 21 | 22 | # Local configuration file (sdk path, etc) 23 | local.properties 24 | 25 | # Proguard folder generated by Eclipse 26 | proguard/ 27 | 28 | # Log Files 29 | *.log 30 | 31 | #JNI generated files 32 | app/src/main/obj/ 33 | app/src/main/libs/ 34 | 35 | #auto-generated files 36 | app/src/main/assets/3_TFTD.zip.MD5 37 | app/src/main/assets/7_translations.zip 38 | app/src/main/assets/3_TFTD.zip 39 | app/src/main/assets/2_UFO.zip 40 | app/src/main/assets/7_translations.zip.MD5 41 | app/src/main/assets/2_UFO.zip.MD5 42 | app/src/main/assets/0_common.zip.MD5 43 | app/src/main/assets/1_standard.zip.MD5 44 | app/src/main/assets/1_standard.zip 45 | app/src/main/assets/0_common.zip 46 | 47 | #keystore 48 | *.keystore 49 | signing.gradle 50 | 51 | # Android Studio 52 | /*/build/ 53 | /*/local.properties 54 | /*/out 55 | /*/*/build 56 | /*/*/production 57 | captures/ 58 | .navigation/ 59 | *.ipr 60 | *~ 61 | *.swp 62 | 63 | # IntelliJ IDEA 64 | *.iml 65 | *.iws 66 | /out/ 67 | 68 | # External native build folder generated in Android Studio 2.2 and later 69 | .externalNativeBuild 70 | 71 | # User-specific configurations 72 | .idea/libraries/ 73 | .idea/workspace.xml 74 | .idea/tasks.xml 75 | .idea/.name 76 | .idea/compiler.xml 77 | .idea/copyright/profiles_settings.xml 78 | .idea/encodings.xml 79 | .idea/misc.xml 80 | .idea/modules.xml 81 | .idea/scopes/scope_settings.xml 82 | .idea/dictionaries 83 | .idea/vcs.xml 84 | .idea/jsLibraryMappings.xml 85 | .idea/datasources.xml 86 | .idea/dataSources.ids 87 | .idea/sqlDataSources.xml 88 | .idea/dynamic.xml 89 | .idea/uiDesigner.xml 90 | 91 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "app/src/main/jni/SDL"] 2 | path = app/src/main/jni/SDL 3 | url = https://github.com/sfalexrog/SDL 4 | [submodule "app/src/main/jni/SDL2_mixer"] 5 | path = app/src/main/jni/SDL2_mixer 6 | url = https://github.com/sfalexrog/SDL2_mixer 7 | [submodule "app/src/main/jni/SDL2_image"] 8 | path = app/src/main/jni/SDL2_image 9 | url = https://github.com/sfalexrog/SDL2_image 10 | [submodule "app/src/main/jni/SDL_gfx"] 11 | path = app/src/main/jni/SDL_gfx 12 | url = https://github.com/sfalexrog/SDL_gfx 13 | [submodule "app/src/main/jni/yaml-cpp"] 14 | path = app/src/main/jni/yaml-cpp 15 | url = https://github.com/jbeder/yaml-cpp 16 | [submodule "app/src/main/jni/OpenXcom"] 17 | path = app/src/main/jni/OpenXcom 18 | url = https://github.com/sfalexrog/OpenXcom 19 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | dist: trusty 3 | sudo: false 4 | addons: 5 | apt: 6 | packages: 7 | - p7zip-full 8 | env: 9 | - BUILD_ARCH_LIST='armeabi' 10 | - BUILD_ARCH_LIST='armeabi-v7a' 11 | - BUILD_ARCH_LIST='x86' 12 | - BUILD_ARCH_LIST='x86_64' 13 | - BUILD_ARCH_LIST='arm64-v8a' 14 | before_install: 15 | - pip install --user transifex-client 16 | - printf "[https://www.transifex.com]\nhostname = https://www.transifex.com\npassword = ${TRAVIS_TRANSIFEX_API:-badpassword}\nusername = api\n" > ~/.transifexrc 17 | - pushd app/src/main/jni/OpenXcom 18 | - tx pull -a || true 19 | - bin/translations_merge.sh && popd 20 | - openssl enc -d -aes-256-cbc -in private.enc -out private.7z -md sha256 -pass $TRAVIS_PRIVATE_PASS || true 21 | - 7z x private.7z > /dev/null || true 22 | - yes | ${ANDROID_HOME}/tools/bin/sdkmanager --update 23 | - wget --timeout=120 --quiet https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip -O ndk.zip 24 | - sha1sum ndk.zip | grep 0bf02d4e8b85fd770fd7b9b2cdec57f9441f27a2 25 | - 7z x ndk.zip > /dev/null 26 | - export ANDROID_NDK=$(pwd)/android-ndk-r15c 27 | - printf "ndk.dir=$ANDROID_NDK" > local.properties 28 | after_success: 29 | - ls -laR app/build/outputs 30 | deploy: 31 | provider: releases 32 | api_key: 33 | secure: "FxhgpuzdvKtr5+1fNAWGzUx5ExG0Mp+S5wC5urxhuvhUKyEMCc20ReoZhrFyMwUJdxlNJqODjuznvS/sZrMEOK2cFIWrwPwU5ymP4bkAgdFBj0azy8pitTN7EDXV18sZJmMp5IL9B2ZfBHJ6smvdfBmnYYpqOL2l7TBb4Np0gDWGDmgtNVTP62KR+OLnnvFz45//IpyAXQfx3rrPImSueIsXEFrkNDXrE9gPHVcHFUomCedOKSYUQ4D4GRLDWmvVleRsgtU+3j/1l3+xHGlGxrToG6Zv/OyVkEKYnwEX2LddicIJZQuwvF6J2f+wwHrwX6EVAtTsKVhtnbc7GuJM0h9SKCkG49bsyEQHDf/taxWvIQ3yKcpp4v0Nk830RbO1fR4hbt211S34NKdqWKje54H9snhP9p4lV9ZTUVk0ABNEPG6Ol7ULlFdJm77oxaJxrKXDR11ii7HoBMeddpSO+LTgntHDg98hOGhfasPmylwho24fRXdZyAZSJZMvO2UaCg3lVlMwa41Tql0bpARnSEP2zOF271TvHCn0XPP2IvQKJXPNrbtiYkYahfxe5w2F5PYK7bH56XP6HWo3Z54HtC19JQjJLX5IgU/iqlqNlnjHFPvVkNDLkNlV81X2178rwS04uamtgGzw+GNYdBT4wHddBroYvMCawzfNVjpmJMI=" 34 | file: app/build/outputs/apk/OpenXcom*.apk 35 | file_glob: true 36 | skip_cleanup: true 37 | on: 38 | tags: true 39 | android: 40 | components: 41 | - tools 42 | - build-tools 43 | - tools 44 | jdk: 45 | - oraclejdk8 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenXcom for Android 2 | 3 | OpenXcom for Android is, as the name suggests, a port of [OpenXcom](http://openxcom.org) to the 4 | Android platform. In order to achieve this, it uses SDL2 set of libraries, and a portion of Java 5 | code for some convenient features like auto-updating files after installing new version. 6 | 7 | Uses [afiledialog](https://github.com/jfmdev/afiledialog) library. 8 | 9 | # Building [![Build Status](https://travis-ci.org/sfalexrog/openxcom-android.svg?branch=master)](https://travis-ci.org/sfalexrog/openxcom-android) 10 | 11 | In order to build OpenXcom for Android, you'll need: 12 | 13 | - A current Android SDK, and 14 | - A current Android NDK (tested with r15c). 15 | 16 | Additionally, you'll need Java development kit and Java runtime environment version 1.8 17 | (OpenJDK 8 seems to be preferred, although you could probably get by with Oracle JDK 8), which is required for building Android applications. 18 | 19 | Ideally, you should install Android Studio and try building some basic projects. If everything works, 20 | then it should work just fine with this project. 21 | 22 | OpenXcom uses [transifex](https://www.transifex.com) for translations, so you might want to have 23 | its tx command-line tool for translation updates. 24 | 25 | ## Getting the Code 26 | 27 | This project uses git submodules, so in order to get the code, you'll have to do the following: 28 | 29 | 1. Clone this project: 30 | 31 | 32 | $ git clone https://github.com/sfalexrog/openxcom-android.git 33 | $ cd openxcom-android 34 | 35 | or 36 | 37 | $ mkdir oxc-android 38 | $ cd oxc-android 39 | $ git init 40 | $ git remote add upstream https://github.com/sfalexrog/openxcom-android.git 41 | $ git checkout master 42 | 43 | 2. Get submodules 44 | 45 | 46 | $ git submodule init 47 | $ git sibmodule update 48 | 49 | 3. Since this project uses Android NDK (currently built with r15c), you'll need to provide path 50 | to it. Additionally, you'll have to provide path to Android SDK as well. These paths should be in 51 | the local.properties file in the project root. The file should contain the following lines: 52 | 53 | 54 | sdk.dir=/path/to/Android/sdk 55 | ndk.dir=/path/to/Android/ndk 56 | 57 | with your own actual paths substituted instead of these placeholders. 58 | 59 | Note that gradle will attempt to install all dependencies (except for ndk for some reason) if you're missing some of them. 60 | You'll need to have licenses for them, however. In order to get those licenses, run `${ANDROID_SDK}/tools/bin/sdkmanager --licenses` 61 | and accept at least the `android-sdk-license`. 62 | 63 | # Building the app 64 | 65 | At this point you may just run the Gradle wrapper with the `assemble` task: 66 | 67 | 68 | $ ./gradlew assemble 69 | 70 | The resulting .apk will be in `app/build/outputs/apk` folder. 71 | 72 | You might also include some additional data in the apk itself. Everything you put in `app/src/main 73 | /jni/OpenXcom/bin` subdirectories will be packed as assets, so you might include some mods that will be 74 | automatically installed or even the game data that won't require to go through the data copying 75 | process. Note that redistribution of such builds might be illegal in some countries, and as 76 | such they should be only used for debugging purposes. 77 | 78 | ## Translations 79 | 80 | If you have a working, properly configured Transifex client, you might want to download the latest 81 | translations. From `app/src/main/jni/OpenXcom`, run 82 | 83 | 84 | $ tx pull 85 | $ cd bin 86 | $ ./translations_merge.sh 87 | 88 | and rebuild the project. 89 | 90 | # Mod compatibility 91 | 92 | Since most of the code was not touched in SDL1.2 to SDL2 transition, most mods should work out-of-box. 93 | However, that's not the case with binary mods (i.e. mods that provide a separate executable) or 94 | mods that require a custom version of the executable. Fortunately, such mods are usually open-source 95 | and should merge with little to no conflicts. 96 | 97 | In order to apply your modifications to the source code, you should do the following (I'll use 98 | OpenXcom Extended as an example): 99 | 100 | 1. Go to `app/src/main/jni/OpenXcom` 101 | 102 | 2. Add your mod repository as a remote: 103 | 104 | 105 | $ git remote add extended https://github.com/Yankes/OpenXcom.git 106 | 107 | 3. Merge the code (preferably in a separate branch): 108 | 109 | 110 | $ git fetch extended 111 | $ git merge extended/OpenXcomExtended 112 | 113 | 4. Resolve merge conflicts (there shouldn't be many, and they shouldn't be major) 114 | 115 | 5. Build and test your mod! 116 | 117 | # Caveats 118 | 119 | This project uses Google's modified cmake to build native code. It's installed automatically through gradle 120 | (if you have the `android-sdk-license`, at least), but it might not work on some distributions due to its reliance 121 | on a particular version of OpenSSL. Seems to work just fine on Ubuntu, required a custom build of OpenSSL on Fedora. YMMV. 122 | 123 | I'm no expert in Gradle build system, so most of the code is not very good. Anyway, it seems to work, 124 | and I'm not touching it anytime soon. 125 | 126 | This project is basically my "hello world", and it started at the time when I didn't really know what 127 | Java was. Expect bad code and inefficient solutions. Better yet, send me a P/R to fix something :-) 128 | 129 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | // Dummy values 2 | ext.signing = [ 3 | enabled : false, 4 | storeFilePath: '.keystore', 5 | storePassword: 'password', 6 | keyAlias : 'alias', 7 | keyPassword : 'password', 8 | ] 9 | apply plugin: 'com.android.application' 10 | if (file('signing.gradle').exists()) { 11 | apply from: 'signing.gradle' 12 | } 13 | 14 | def git = org.ajoberstar.grgit.Grgit.open(file('..')) 15 | ext.revision = git.head().getAbbreviatedId(7) 16 | 17 | def buildArchEnv = System.getenv()['BUILD_ARCH_LIST'] 18 | 19 | def buildArchList = new ArrayList() 20 | 21 | if (!buildArchEnv) { 22 | buildArchList.addAll(["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]) 23 | } else { 24 | buildArchList.addAll(buildArchEnv.split(":")) 25 | } 26 | 27 | android { 28 | compileSdkVersion 25 29 | buildToolsVersion "25.0.2" 30 | 31 | externalNativeBuild { 32 | cmake { 33 | path "src/main/jni/CMakeLists.txt" 34 | } 35 | } 36 | 37 | defaultConfig { 38 | applicationId "org.libsdl.openxcom" 39 | minSdkVersion 14 40 | targetSdkVersion 25 41 | 42 | externalNativeBuild { 43 | cmake { 44 | arguments "-DANDROID_UNIFIED_HEADERS=ON", 45 | "-DANDROID_STL=c++_static", "-DANDROID_ARM_MODE=arm", 46 | "-DANDROID_ARM_NEON=TRUE", 47 | "-DANDROID_PLATFORM=android-9" 48 | abiFilters.addAll(buildArchList) 49 | cppFlags "-std=c++11", "-fexceptions", "-frtti" 50 | } 51 | } 52 | } 53 | 54 | if (project.signing.enabled) { 55 | signingConfigs { 56 | release { 57 | storeFile file(project.signing.storeFilePath) 58 | storePassword project.signing.storePassword 59 | keyAlias project.signing.keyAlias 60 | keyPassword project.signing.keyPassword 61 | 62 | applicationVariants.all { variant -> 63 | variant.outputs.each { output -> 64 | output.outputFile = new File(output.outputFile.parent, 65 | output.outputFile.name.replace("app-release", 66 | "OpenXcom-v1.0-g${project.revision}-${buildArchList.join('_')}")) 67 | } 68 | } 69 | } 70 | } 71 | buildTypes { 72 | release { 73 | signingConfig signingConfigs.release 74 | externalNativeBuild { 75 | cmake { 76 | cFlags "-O3", "-ffast-math" 77 | cppFlags "-O3", "-ffast-math" 78 | } 79 | } 80 | } 81 | } 82 | } 83 | 84 | tasks.withType(Zip) { 85 | task -> 86 | task.doLast { 87 | ant.checksum file: it.archivePath, algorithm: "MD5" 88 | } 89 | } 90 | 91 | buildTypes { 92 | release { 93 | minifyEnabled false 94 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 95 | } 96 | debugJava { 97 | debuggable true 98 | jniDebuggable false 99 | minifyEnabled false 100 | zipAlignEnabled true 101 | } 102 | } 103 | } 104 | def getFolder(resource) { 105 | def binDir = file('src/main/jni/OpenXcom/bin/' + resource); 106 | return binDir; 107 | } 108 | task packBin(description: 'Update data files.') { 109 | def index = 0; 110 | ['common', 'standard', 'UFO', 'TFTD'].each { String res -> 111 | def zip = task("zip" + res, type: Zip) 112 | zip.doFirst { println('Packing ' + res + '...') } 113 | zip.destinationDir = file('src/main/assets') 114 | zip.archiveName = index.toString() + "_" + res + '.zip' 115 | zip.from getFolder(res) 116 | zip.into res 117 | zip.execute() 118 | index++; 119 | } 120 | def zipTranslations = task("zipTranslations", type: Zip) 121 | zipTranslations.doFirst { println('Packing translations...') } 122 | zipTranslations.destinationDir = file('src/main/assets') 123 | zipTranslations.archiveName = '7_translations.zip' 124 | zipTranslations.from getFolder('translations/output') 125 | zipTranslations.execute() 126 | } 127 | 128 | gradle.projectsEvaluated { 129 | preBuild.dependsOn packBin 130 | } 131 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 31 | 37 | 41 | 42 | 51 | 52 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /app/src/main/assets/9_ufo-patch.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/assets/9_ufo-patch.zip -------------------------------------------------------------------------------- /app/src/main/assets/9_ufo-patch.zip.MD5: -------------------------------------------------------------------------------- 1 | 4b3d600f782a33bb3c432dce7c9f283e -------------------------------------------------------------------------------- /app/src/main/assets/z_nomedia.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/assets/z_nomedia.zip -------------------------------------------------------------------------------- /app/src/main/assets/z_nomedia.zip.MD5: -------------------------------------------------------------------------------- 1 | 4e9826c7b348763aa71aae54bb186f80 *z_nomedia.zip 2 | -------------------------------------------------------------------------------- /app/src/main/java/ar/com/daidalos/afiledialog/FileChooser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * "Copyright 2013 Jose F. Maldonado" 3 | * 4 | * This file is part of aFileDialog. 5 | * 6 | * aFileDialog is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published 8 | * by the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * aFileDialog is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with aFileDialog. If not, see . 18 | */ 19 | 20 | package ar.com.daidalos.afiledialog; 21 | 22 | import android.content.Context; 23 | import android.widget.LinearLayout; 24 | 25 | /** 26 | * This interface defines all the methods that a file chooser must implement, in order to being able to make use of the class FileChooserUtils. 27 | */ 28 | interface FileChooser { 29 | 30 | /** 31 | * Gets the root of the layout 'file_chooser.xml'. 32 | * 33 | * @return A linear layout. 34 | */ 35 | LinearLayout getRootLayout(); 36 | 37 | /** 38 | * Set the name of the current folder. 39 | * 40 | * @param name The current folder's name. 41 | */ 42 | void setCurrentFolderName(String name); 43 | 44 | /** 45 | * Returns the current context of the file chooser. 46 | * 47 | * @return The current context. 48 | */ 49 | Context getContext(); 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/ar/com/daidalos/afiledialog/FileChooserLabels.java: -------------------------------------------------------------------------------- 1 | /* 2 | * "Copyright 2013 Jose F. Maldonado" 3 | * 4 | * This file is part of aFileDialog. 5 | * 6 | * aFileDialog is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published 8 | * by the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * aFileDialog is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with aFileDialog. If not, see . 18 | */ 19 | 20 | package ar.com.daidalos.afiledialog; 21 | 22 | import java.io.Serializable; 23 | 24 | /** 25 | * Instances of this classes are used to re-define the value of the labels of a file chooser. 26 | * 27 | * If an attribute is set to null, then the default value is going to be used. 28 | */ 29 | public class FileChooserLabels implements Serializable { 30 | 31 | /** 32 | * Static field required by the interface Serializable. 33 | */ 34 | private static final long serialVersionUID = 1L; 35 | 36 | /** 37 | * Default's constructor. 38 | */ 39 | public FileChooserLabels() { 40 | this.labelAddButton = null; 41 | this.labelSelectButton = null; 42 | this.messageConfirmSelection = null; 43 | this.messageConfirmCreation = null; 44 | this.labelConfirmYesButton = null; 45 | this.labelConfirmNoButton = null; 46 | this.createFileDialogTitle = null; 47 | this.createFileDialogTitle = null; 48 | this.createFileDialogAcceptButton = null; 49 | this.createFileDialogCancelButton = null; 50 | } 51 | 52 | /** 53 | * The label for the button used to create a file or a folder. 54 | */ 55 | public String labelAddButton; 56 | 57 | /** 58 | * The label for the button for select the current folder (when using the file chooser for select folders). 59 | */ 60 | public String labelSelectButton; 61 | 62 | /** 63 | * The message displayed by the confirmation dialog, when selecting a file. 64 | * 65 | * In this string, the character sequence '$file_name' is going to be replace by the file's name. 66 | */ 67 | public String messageConfirmSelection; 68 | 69 | /** 70 | * The message displayed by the confirmation dialog, when creating a file. 71 | * 72 | * In this string, the character sequence '$file_name' is going to be replace by the file's name. 73 | */ 74 | public String messageConfirmCreation; 75 | 76 | /** 77 | * The label for the 'yes' button when confirming the selection o creation of a file. 78 | */ 79 | public String labelConfirmYesButton; 80 | 81 | /** 82 | * The label for the 'no' button when confirming the selection o creation of a file. 83 | */ 84 | public String labelConfirmNoButton; 85 | 86 | /** 87 | * The title of the dialog for create a file. 88 | */ 89 | public String createFileDialogTitle; 90 | 91 | /** 92 | * The message of the dialog for create a file. 93 | */ 94 | public String createFileDialogMessage; 95 | 96 | /** 97 | * The label of the 'accept' button in the dialog for create a file. 98 | */ 99 | public String createFileDialogAcceptButton; 100 | 101 | /** 102 | * The label of the 'cancel' button in the dialog for create a file. 103 | */ 104 | public String createFileDialogCancelButton; 105 | } 106 | -------------------------------------------------------------------------------- /app/src/main/java/ar/com/daidalos/afiledialog/view/FileItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * "Copyright 2013 Jose F. Maldonado" 3 | * 4 | * This file is part of aFileDialog. 5 | * 6 | * aFileDialog is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public License as published 8 | * by the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * aFileDialog is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with aFileDialog. If not, see . 18 | */ 19 | 20 | package ar.com.daidalos.afiledialog.view; 21 | 22 | import java.io.File; 23 | import java.util.LinkedList; 24 | import java.util.List; 25 | 26 | import android.content.Context; 27 | import android.view.LayoutInflater; 28 | import android.view.View; 29 | import android.widget.ImageView; 30 | import android.widget.LinearLayout; 31 | import android.widget.TextView; 32 | import org.libsdl.openxcom.R; 33 | 34 | /** 35 | * This class is used to represents the files that can be selected by the user. 36 | */ 37 | public class FileItem extends LinearLayout { 38 | 39 | // ----- Attributes ----- // 40 | 41 | /** 42 | * The file which is represented by this item. 43 | */ 44 | private File file; 45 | 46 | /** 47 | * The image in which show the file's icon. 48 | */ 49 | private ImageView icon; 50 | 51 | /** 52 | * The label in which show the file's name. 53 | */ 54 | private TextView label; 55 | 56 | /** 57 | * A boolean indicating if the item can be selected. 58 | */ 59 | private boolean selectable; 60 | 61 | /** 62 | * The listeners for the click event. 63 | */ 64 | private List listeners; 65 | 66 | // ----- Constructor ----- // 67 | 68 | /** 69 | * The class main constructor. 70 | * 71 | * @param context The application's context. 72 | */ 73 | public FileItem(Context context) { 74 | super(context); 75 | 76 | // Define the layout. 77 | LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 78 | inflater.inflate(R.layout.daidalos_file_item, this, true); 79 | 80 | // Initialize attributes. 81 | this.file = null; 82 | this.selectable = true; 83 | this.icon = (ImageView) this.findViewById(R.id.imageViewIcon); 84 | this.label = (TextView) this.findViewById(R.id.textViewLabel); 85 | this.listeners = new LinkedList(); 86 | 87 | // Add a listener for the click event. 88 | this.setOnClickListener(this.clickListener); 89 | } 90 | 91 | /** 92 | * A class constructor. 93 | * 94 | * @param context The application's context. 95 | * @param file The file represented by this item 96 | */ 97 | public FileItem(Context context, File file) { 98 | this(context); 99 | 100 | // Set the file. 101 | this.setFile(file); 102 | } 103 | 104 | /** 105 | * A class constructor. 106 | * 107 | * @param context The application's context. 108 | * @param file The file represented by this item. 109 | * @param label The label of this item. 110 | */ 111 | public FileItem(Context context, File file, String label) { 112 | this(context, file); 113 | 114 | // Set the label. 115 | this.setLabel(label); 116 | } 117 | 118 | // ----- Get() and Set() methods ----- // 119 | 120 | /** 121 | * Defines the file represented by this item. 122 | * 123 | * @param file A file. 124 | */ 125 | public void setFile(File file) { 126 | if(file != null) { 127 | this.file = file; 128 | 129 | // Replace the label by the file's name. 130 | this.setLabel(file.getName()); 131 | 132 | // Change the icon, depending if the file is a folder or not. 133 | this.updateIcon(); 134 | } 135 | } 136 | 137 | /** 138 | * Returns the file represented by this item. 139 | * 140 | * @return A file. 141 | */ 142 | public File getFile() { 143 | return this.file; 144 | } 145 | 146 | /** 147 | * Changes the label of this item, which by default is the file's name. 148 | * 149 | * This method must be called after invoking the method setFile(), otherwise 150 | * the label is going to be overwritten with the file's name. 151 | * 152 | * @param label A string value. 153 | */ 154 | public void setLabel(String label) { 155 | // Verify if 'label' is not null. 156 | if(label == null) label = ""; 157 | 158 | // Change the label. 159 | this.label.setText(label); 160 | } 161 | 162 | /** 163 | * Verifies if the item can be selected. 164 | * 165 | * @return 'true' if the item can be selected, 'false' if not. 166 | */ 167 | public boolean isSelectable() { 168 | return this.selectable; 169 | } 170 | 171 | /** 172 | * Defines if the item can be selected or not. 173 | * 174 | * @param selectable 'true' if the item can be selected, 'false' if not. 175 | */ 176 | public void setSelectable(boolean selectable) { 177 | // Save the value. 178 | this.selectable = selectable; 179 | 180 | // Update the icon. 181 | this.updateIcon(); 182 | } 183 | 184 | // ----- Miscellaneous methods ----- // 185 | 186 | /** 187 | * Updates the icon according to if the file is a folder and if it can be selected. 188 | */ 189 | private void updateIcon() { 190 | // Define the icon. 191 | int icon = R.drawable.document_gray; 192 | if(this.selectable) { 193 | icon = (this.file != null && file.isDirectory())? R.drawable.folder : R.drawable.document; 194 | } 195 | 196 | // Set the icon. 197 | this.icon.setImageDrawable(getResources().getDrawable( icon )); 198 | 199 | // Change the color of the text. 200 | if(icon != R.drawable.document_gray) { 201 | this.label.setTextColor(getResources().getColor(R.color.daidalos_active_file)); 202 | } else { 203 | this.label.setTextColor(getResources().getColor(R.color.daidalos_inactive_file)); 204 | } 205 | } 206 | 207 | // ----- Events ----- // 208 | 209 | /** 210 | * Listener for the click event. 211 | */ 212 | private View.OnClickListener clickListener = new View.OnClickListener() { 213 | 214 | public void onClick(View v) { 215 | // Verify if the item can be selected. 216 | if(FileItem.this.selectable) { 217 | // Call the listeners. 218 | for(int i=0; i 10) 109 | { 110 | mRootView.setSystemUiVisibility(mUiVisibilityFlags); 111 | if ((mUiVisibilityFlags & (View.STATUS_BAR_HIDDEN | View.SYSTEM_UI_FLAG_LOW_PROFILE)) != 0) { 112 | uiVisibilityChangeListener l = new uiVisibilityChangeListener(mActivity, mUiVisibilityFlags); 113 | mRootView.setOnSystemUiVisibilityChangeListener(l); 114 | } else { 115 | mRootView.setOnSystemUiVisibilityChangeListener(null); 116 | } 117 | } 118 | 119 | } 120 | 121 | } 122 | 123 | /** 124 | * A listener that restores UI visibility to its previous state if needed. 125 | */ 126 | @TargetApi(11) 127 | final class uiVisibilityChangeListener implements View.OnSystemUiVisibilityChangeListener { 128 | 129 | private Activity mActivity = null; 130 | private int mUiFlags; 131 | 132 | public uiVisibilityChangeListener(Activity activity, int flags) { 133 | mActivity = activity; 134 | mUiFlags = flags; 135 | } 136 | 137 | @Override 138 | public void onSystemUiVisibilityChange(int visibility) { 139 | Timer timer = new Timer(); 140 | timer.schedule(new TimerTask() { 141 | @Override 142 | public void run() { 143 | mActivity.runOnUiThread(new Runnable() { 144 | @Override 145 | public void run() { 146 | mActivity.getWindow().getDecorView().setSystemUiVisibility(mUiFlags); 147 | }}); 148 | }}, 1000); 149 | } 150 | 151 | } 152 | -------------------------------------------------------------------------------- /app/src/main/java/org/libsdl/openxcom/config/DataCheckResult.java: -------------------------------------------------------------------------------- 1 | package org.libsdl.openxcom.config; 2 | 3 | /** 4 | * The result of checking data. This object contains flag of whether the game data 5 | * was found in the specified folder, version string and additional notes (if any). 6 | * This object is normally constructed by DataChecker, and you don't need to 7 | * create it yourself. 8 | * Created by Alexey on 13.06.2015. 9 | */ 10 | public class DataCheckResult { 11 | private final boolean found; 12 | private final String version; 13 | private final String notes; 14 | 15 | /** 16 | * Was the game data present at the specified location? 17 | * @return true if the game data was present. 18 | */ 19 | public boolean isFound() { 20 | return found; 21 | } 22 | 23 | /** 24 | * Which version corresponds to the data? 25 | * @return The short version description. 26 | */ 27 | public String getVersion() { 28 | return version; 29 | } 30 | 31 | /** 32 | * Gets any additional noteworthy information about the game files. 33 | * @return Additional notes on the game version. 34 | */ 35 | public String getNotes() { 36 | return notes; 37 | } 38 | 39 | public DataCheckResult(boolean found, String version, String notes) { 40 | this.found = found; 41 | this.version = version; 42 | this.notes = notes; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/org/libsdl/openxcom/config/DataChecker.java: -------------------------------------------------------------------------------- 1 | package org.libsdl.openxcom.config; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * A data checker interface. Implementations of this interface should check for game data 7 | * and return the corresponding DataCheckResult object. 8 | * Created by Alexey on 13.06.2015. 9 | */ 10 | public interface DataChecker { 11 | /** 12 | * Checks data at the supplied path. 13 | * @param path Path to folder containing game files. 14 | * @return DataCheckResult object containing check status 15 | * and brief version desctiption. 16 | */ 17 | DataCheckResult checkWithPath(String path); 18 | 19 | /** 20 | * Gets a set of subdirectories that are scanned during checking. 21 | * @return A set of subdirectory names. 22 | */ 23 | Set getDirChecklist(); 24 | 25 | /** 26 | * Gets the name of subdirectory in the data folder where the game files should be put. 27 | * @return The name of the subdirectory ("UFO", "TFTD", etc). 28 | */ 29 | String getInstallDir(); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/libsdl/openxcom/util/FilesystemHelper.java: -------------------------------------------------------------------------------- 1 | package org.libsdl.openxcom.util; 2 | 3 | import java.io.BufferedInputStream; 4 | import java.io.File; 5 | import java.io.FileInputStream; 6 | import java.io.FileOutputStream; 7 | import java.io.IOException; 8 | import java.io.InputStream; 9 | import java.io.OutputStream; 10 | import java.util.zip.ZipEntry; 11 | import java.util.zip.ZipInputStream; 12 | 13 | import android.util.Log; 14 | 15 | 16 | /* 17 | * A collection of methods to be used by other classes. 18 | */ 19 | 20 | public final class FilesystemHelper { 21 | 22 | public static final int BUFFER_SIZE = 8192; 23 | 24 | /** 25 | * Creates a copy of the file 26 | * @param in Source file 27 | * @param out Destination file 28 | * @throws IOException if the operation fails. 29 | * 30 | */ 31 | public static void copyFile(File in, File out) throws IOException { 32 | InputStream in_stream = new FileInputStream(in); 33 | OutputStream out_stream = new FileOutputStream(out); 34 | copyStream(in_stream, out_stream); 35 | in_stream.close(); 36 | out_stream.close(); 37 | } 38 | 39 | /** 40 | * Creates a copy of the file, ensuring the file is written to the disk 41 | * @param in Source file 42 | * @param out Destination file 43 | * @throws IOException if the operation fails 44 | */ 45 | public static void copyFileSync(File in, File out) throws IOException { 46 | FileInputStream inStream = new FileInputStream(in); 47 | FileOutputStream outStream = new FileOutputStream(out); 48 | try { 49 | copyStream(inStream, outStream); 50 | } finally { 51 | inStream.close(); 52 | outStream.flush(); 53 | outStream.getFD().sync(); 54 | outStream.close(); 55 | } 56 | } 57 | 58 | /** 59 | * Copies inputStream to outputStream in a somewhat buffered way 60 | * @param in Input stream 61 | * @param out Output stream 62 | * @throws IOException if the operation fails 63 | */ 64 | public static void copyStream(InputStream in, OutputStream out) throws IOException { 65 | byte[] buffer = new byte[BUFFER_SIZE]; 66 | int read; 67 | while((read = in.read(buffer)) != -1){ 68 | out.write(buffer, 0, read); 69 | } 70 | } 71 | 72 | /** 73 | * Copies contents of in_folder to out_folder. 74 | * @param in_folder Source folder. 75 | * @param out_folder Destination folder. 76 | * @param recursive Copy subdirectories as well. 77 | * @throws IOException 78 | */ 79 | public static void copyFolder(File in_folder, File out_folder, boolean recursive) throws IOException { 80 | if (!out_folder.exists()) { 81 | if (!out_folder.mkdirs()) { 82 | throw new IOException("Could not create target directory: " + out_folder.getAbsolutePath()); 83 | } 84 | } 85 | if (!in_folder.isDirectory()) { 86 | throw new IOException("Source is not a directory: " + in_folder.getAbsolutePath()); 87 | } 88 | if (!out_folder.isDirectory()) { 89 | throw new IOException("Target is not a directory: " + out_folder.getAbsolutePath()); 90 | } 91 | Log.i("copyFolder", "Source folder: " + in_folder.getPath() + "; Target folder: " + out_folder.getPath()); 92 | File[] in_list = in_folder.listFiles(); 93 | for (File in_file : in_list) { 94 | if (in_file.isDirectory()) 95 | { 96 | if (recursive) { 97 | File out_subfolder = new File(out_folder.getAbsolutePath() + "/" + in_file.getName()); 98 | copyFolder(in_file, out_subfolder, true); 99 | } 100 | } else { 101 | File out_file = new File(out_folder.getAbsolutePath() + "/" + in_file.getName()); 102 | Log.i("FileHelper", "Source: " + in_file.getPath() + "; Destination: " + out_file.getPath()); 103 | copyFileSync(in_file, out_file); 104 | } 105 | 106 | 107 | } 108 | } 109 | 110 | /** 111 | * Extracts the whole contents of in_file to out_dir. 112 | * @param in_file A file object pointing to a zip file. 113 | * @param out_dir A directory where the contents of the file should be placed. 114 | * @throws IOException if there's a problem with one of the files 115 | */ 116 | public static void zipExtract(File in_file, File out_dir) throws IOException { 117 | InputStream is = new FileInputStream(in_file); 118 | BufferedInputStream bis = new BufferedInputStream(is, BUFFER_SIZE); 119 | zipExtract(bis, out_dir); 120 | } 121 | /** 122 | * Reads the in_stream and extracts them to out_dir. 123 | * @param in_stream Input stream corresponding to the zip file. 124 | * @param out_dir Output directory for the zip file contents. 125 | * @throws IOException 126 | */ 127 | public static void zipExtract(InputStream in_stream, File out_dir) throws IOException { 128 | if (!out_dir.exists()) { 129 | if(!out_dir.mkdirs()) { 130 | throw new IOException("Could not create output directory: " + out_dir.getAbsolutePath()); 131 | } 132 | } 133 | ZipInputStream zis = new ZipInputStream(in_stream); 134 | ZipEntry ze; 135 | byte[] buffer = new byte[BUFFER_SIZE]; 136 | int count; 137 | while((ze = zis.getNextEntry()) != null) { 138 | if (ze.isDirectory()) { 139 | File fmd = new File(out_dir.getAbsolutePath() + "/" + ze.getName()); 140 | fmd.mkdirs(); 141 | continue; 142 | } 143 | FileOutputStream fout = new FileOutputStream(out_dir.getAbsolutePath() + "/" + ze.getName()); 144 | while ((count = zis.read(buffer)) != -1) { 145 | fout.write(buffer, 0, count); 146 | } 147 | 148 | fout.close(); 149 | zis.closeEntry(); 150 | } 151 | zis.close(); 152 | } 153 | 154 | /** 155 | * Returns true if files are same and false value if the files are different. 156 | * This function is very slow, so it will probably need a rewrite. 157 | * @param fileIS1 Input stream associated with the first file 158 | * @param fileIS2 Input stream associated with the second file 159 | * @return True if the files are the same, false otherwise. 160 | * @throws IOException if an error is encountered. 161 | */ 162 | public static boolean sameContents(InputStream fileIS1, InputStream fileIS2) throws IOException { 163 | int b1 = fileIS1.read(); 164 | int b2 = fileIS2.read(); 165 | while((b1 != -1) && (b2 != -1)) 166 | { 167 | if (b1 != b2) { 168 | return false; 169 | } 170 | b1 = fileIS1.read(); 171 | b2 = fileIS2.read(); 172 | } 173 | return b1 == b2; 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /app/src/main/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This is an attempt to port the .mk files over to CMake. 2 | # Looks like CMake is the way to go (for now) for all native android 3 | # projects. 4 | # 5 | # Please don't try to use this file as a reference anywhere. I barely 6 | # even know what cmake is, let alone how to write it. The way I write it, 7 | # it's even more rigid than makefiles, which kinda defeats the whole 8 | # purpose of the damn thing. 9 | 10 | # Don't try to use this for anything but the android build. 11 | # You've been warned. 12 | 13 | # Android Studio seems to use this version 14 | cmake_minimum_required(VERSION 3.4.1) 15 | 16 | project(OPENXCOM CXX) 17 | 18 | set(SDL_PATH SDL) 19 | set(SDL2_IMAGE_PATH SDL2_image) 20 | set(SDL2_MIXER_PATH SDL2_mixer) 21 | set(SDL_GFX_PATH SDL_gfx) 22 | set(YAML_CPP_PATH yaml-cpp) 23 | set(LIBMAD_PATH libmad-0.15.1b) 24 | 25 | set(LIBRARIES_BUILD_TYPE STATIC) 26 | 27 | # Build prerequisites first (yeah, by including whole files) 28 | include(deps_cmake/sdl.cmake) 29 | include(deps_cmake/sdl2_image.cmake) 30 | include(deps_cmake/libmad.cmake) 31 | include(deps_cmake/sdl2_mixer.cmake) 32 | include(deps_cmake/sdl_gfx.cmake) 33 | include(deps_cmake/yaml-cpp.cmake) 34 | 35 | #file(GLOB OPENXCOM_FILES_BASE 36 | # OpenXcom/src/*.cpp) 37 | set(OPENXCOM_FILES_BASE 38 | OpenXcom/src/main.cpp 39 | OpenXcom/src/lodepng.cpp) 40 | 41 | file(GLOB OPENXCOM_FILES_BASESCAPE 42 | OpenXcom/src/Basescape/*.cpp) 43 | 44 | file(GLOB OPENXCOM_FILES_BATTLESCAPE 45 | OpenXcom/src/Battlescape/*.cpp) 46 | 47 | file(GLOB OPENXCOM_FILES_ENGINE 48 | OpenXcom/src/Engine/*.cpp 49 | OpenXcom/src/Engine/Adlib/*.cpp 50 | OpenXcom/src/Engine/Scalers/*.cpp 51 | ) 52 | 53 | file(GLOB OPENXCOM_FILES_GEOSCAPE 54 | OpenXcom/src/Geoscape/*.cpp) 55 | 56 | file(GLOB OPENXCOM_FILES_INTERFACE 57 | OpenXcom/src/Interface/*.cpp) 58 | 59 | file(GLOB OPENXCOM_FILES_MENU 60 | OpenXcom/src/Menu/*.cpp) 61 | 62 | file(GLOB OPENXCOM_FILES_MOD 63 | OpenXcom/src/Mod/*.cpp) 64 | 65 | file(GLOB OPENXCOM_FILES_SAVEGAME 66 | OpenXcom/src/Savegame/*.cpp) 67 | 68 | file(GLOB OPENXCOM_FILES_UFOPAEDIA 69 | OpenXcom/src/Ufopaedia/*.cpp) 70 | 71 | set(OPENXCOM_SOURCES 72 | ${OPENXCOM_FILES_BASE} 73 | ${OPENXCOM_FILES_BASESCAPE} 74 | ${OPENXCOM_FILES_BATTLESCAPE} 75 | ${OPENXCOM_FILES_ENGINE} 76 | ${OPENXCOM_FILES_GEOSCAPE} 77 | ${OPENXCOM_FILES_INTERFACE} 78 | ${OPENXCOM_FILES_MENU} 79 | ${OPENXCOM_FILES_MOD} 80 | ${OPENXCOM_FILES_SAVEGAME} 81 | ${OPENXCOM_FILES_UFOPAEDIA} 82 | src/SDL_android_main.c 83 | ) 84 | 85 | add_library(openxcom 86 | SHARED 87 | ${OPENXCOM_SOURCES} 88 | ) 89 | 90 | find_library(EGL_LIB EGL) 91 | find_library(LOG_LIB log) 92 | find_library(GLESv2_LIB GLESv2) 93 | find_library(ZLIB z) 94 | find_library(DLLIB dl) 95 | 96 | target_link_libraries(openxcom 97 | SDL2 98 | SDL2_image 99 | SDL2_mixer 100 | SDL_gfx 101 | YAML_CPP 102 | ${EGL_LIB} 103 | ${LOG_LIB} 104 | ${GLESv2_LIB} 105 | ${ZLIB} 106 | ${DLLIB} 107 | ) 108 | 109 | set_target_properties(openxcom 110 | PROPERTIES 111 | COMPILE_FLAGS 112 | "-D__NO_OPENGL\ 113 | -D__MOBILE__\ 114 | -DGIT_BUILD" 115 | ) 116 | #if (CMAKE_BUILD_TYPE EQUAL "Release") 117 | # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") 118 | # set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flto") 119 | # set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto") 120 | # set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -flto") 121 | #endif() 122 | 123 | # Taken from OpenXcom cmake 124 | if ( "${OPENXCOM_VERSION_STRING}" STREQUAL "" ) 125 | find_package ( Git ) 126 | if ( GIT_FOUND ) 127 | message("git found: ${GIT_EXECUTABLE}") 128 | execute_process ( COMMAND ${GIT_EXECUTABLE} describe --dirty 129 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 130 | OUTPUT_VARIABLE git_describe_out 131 | ERROR_VARIABLE git_describe_error 132 | RESULT_VARIABLE git_describe_result 133 | ) 134 | string ( REGEX MATCH "([a-z|0-9|.]*)-([0-9]*)-g([a-z|0-9]*)([-|a-z]*)" git_commit "${git_describe_out}" ) 135 | set ( git_tag ${CMAKE_MATCH_1} ) 136 | set ( git_nb_commit ${CMAKE_MATCH_2} ) 137 | set ( git_commit ${CMAKE_MATCH_3} ) 138 | set ( git_dirty ${CMAKE_MATCH_4} ) 139 | set ( OPENXCOM_VERSION_STRING ".${git_commit}${git_dirty}" ) 140 | else() 141 | # Well, just set the version string to a somewhat sensible default 142 | set ( OPENXCOM_VERSION_STRING ".nogit-dev" ) 143 | endif() 144 | endif() 145 | 146 | add_definitions( -DGIT_BUILD=1 ) 147 | 148 | configure_file("OpenXcom/src/git_version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/git_version.h" ) 149 | include_directories ( "${CMAKE_CURRENT_BINARY_DIR}" ) -------------------------------------------------------------------------------- /app/src/main/jni/deps_cmake/libmad.cmake: -------------------------------------------------------------------------------- 1 | set(LIBMAD_FILES 2 | ${LIBMAD_PATH}/bit.c 3 | ${LIBMAD_PATH}/decoder.c 4 | ${LIBMAD_PATH}/fixed.c 5 | ${LIBMAD_PATH}/frame.c 6 | ${LIBMAD_PATH}/huffman.c 7 | ${LIBMAD_PATH}/layer3.c 8 | ${LIBMAD_PATH}/layer12.c 9 | ${LIBMAD_PATH}/stream.c 10 | ${LIBMAD_PATH}/synth.c 11 | ${LIBMAD_PATH}/timer.c 12 | ${LIBMAD_PATH}/version.c 13 | ) 14 | 15 | add_library(LIBMAD ${LIBRARIES_BUILD_TYPE} 16 | ${LIBMAD_FILES}) 17 | 18 | target_include_directories(LIBMAD BEFORE PRIVATE 19 | ${LIBMAD_PATH}) 20 | 21 | target_include_directories(LIBMAD INTERFACE 22 | ${LIBMAD_PATH}) 23 | 24 | set_target_properties(LIBMAD 25 | PROPERTIES 26 | COMPILE_FLAGS 27 | "-DHAVE_CONFIG_H -DFPM_DEFAULT -DPIC") -------------------------------------------------------------------------------- /app/src/main/jni/deps_cmake/sdl.cmake: -------------------------------------------------------------------------------- 1 | # We don't use SDL's cmake file for some reason (probably because 2 | # I don't really trust Android Studio's cmake to do anything sensible 3 | # with it), so I just use a rough translation of what was in SDL2's Android.mk 4 | 5 | # THIS FILE IS AS BAD AS IT GETS, IT ASSUMES IT'S INCLUDED 6 | # IN THE TOP-LEVEL PROJECT AS IS, DON'T DO THAT KIDS 7 | 8 | file(GLOB SDL_FILES_BASE 9 | ${SDL_PATH}/src/*.c) 10 | 11 | file(GLOB SDL_FILES_ATOMIC 12 | ${SDL_PATH}/src/atomic/*.c) 13 | 14 | file(GLOB SDL_FILES_AUDIO 15 | ${SDL_PATH}/src/audio/*.c 16 | ${SDL_PATH}/src/audio/dummy/*.c 17 | ${SDL_PATH}/src/audio/android/*.c) 18 | 19 | file(GLOB SDL_FILES_CORE 20 | ${SDL_PATH}/src/core/android/*.c) 21 | 22 | file(GLOB SDL_FILES_CPUINFO 23 | ${SDL_PATH}/src/cpuinfo/*.c) 24 | 25 | file(GLOB SDL_FILES_DYNAPI 26 | ${SDL_PATH}/src/dynapi/*.c) 27 | 28 | file(GLOB SDL_FILES_EVENTS 29 | ${SDL_PATH}/src/events/*.c) 30 | 31 | file(GLOB SDL_FILES_FILE 32 | ${SDL_PATH}/src/file/*.c) 33 | 34 | file(GLOB SDL_FILES_FILESYSTEM 35 | ${SDL_PATH}/src/filesystem/android/*.c) 36 | 37 | file(GLOB SDL_FILES_HAPTIC 38 | ${SDL_PATH}/src/haptic/*.c 39 | ${SDL_PATH}/src/haptic/dummy/*.c) 40 | 41 | file(GLOB SDL_FILES_JOYSTICK 42 | ${SDL_PATH}/src/joystick/*.c 43 | ${SDL_PATH}/src/joystick/android/*.c) 44 | 45 | file(GLOB SDL_FILES_LOADSO 46 | ${SDL_PATH}/src/loadso/dlopen/*.c) 47 | 48 | file(GLOB SDL_FILES_POWER 49 | ${SDL_PATH}/src/power/*.c 50 | ${SDL_PATH}/src/power/android/*.c) 51 | 52 | file(GLOB SDL_FILES_RENDER 53 | ${SDL_PATH}/src/render/*.c 54 | ${SDL_PATH}/src/render/opengles/*.c 55 | ${SDL_PATH}/src/render/opengles2/*.c 56 | ${SDL_PATH}/src/render/software/*.c) 57 | 58 | file(GLOB SDL_FILES_STDLIB 59 | ${SDL_PATH}/src/stdlib/*.c) 60 | 61 | file(GLOB SDL_FILES_TEST 62 | ${SDL_PATH}/src/test/*.c) 63 | 64 | file(GLOB SDL_FILES_THREAD 65 | ${SDL_PATH}/src/thread/*.c 66 | ${SDL_PATH}/src/thread/pthread/*.c) 67 | 68 | file(GLOB SDL_FILES_TIMER 69 | ${SDL_PATH}/src/timer/*.c 70 | ${SDL_PATH}/src/timer/unix/*.c) 71 | 72 | file(GLOB SDL_FILES_VIDEO 73 | ${SDL_PATH}/src/video/*.c 74 | ${SDL_PATH}/src/video/android/*.c) 75 | 76 | 77 | set(SDL_SOURCES 78 | ${SDL_FILES_BASE} 79 | ${SDL_FILES_ATOMIC} 80 | ${SDL_FILES_AUDIO} 81 | ${SDL_FILES_CORE} 82 | ${SDL_FILES_CPUINFO} 83 | ${SDL_FILES_DYNAPI} 84 | ${SDL_FILES_EVENTS} 85 | ${SDL_FILES_FILE} 86 | ${SDL_FILES_FILESYSTEM} 87 | ${SDL_FILES_HAPTIC} 88 | ${SDL_FILES_JOYSTICK} 89 | ${SDL_FILES_LOADSO} 90 | ${SDL_FILES_POWER} 91 | ${SDL_FILES_RENDER} 92 | ${SDL_FILES_STDLIB} 93 | ${SDL_FILES_TEST} 94 | ${SDL_FILES_THREAD} 95 | ${SDL_FILES_TIMER} 96 | ${SDL_FILES_VIDEO} 97 | ) 98 | 99 | find_library(LOG_LIB log) 100 | find_library(GLES1_LIB GLESv1_CM) 101 | find_library(GLES2_LIB GLESv2) 102 | find_library(ANDROID_LIB android) 103 | find_library(DL_LIB dl) 104 | 105 | add_library(SDL2 106 | ${LIBRARIES_BUILD_TYPE} 107 | ${SDL_SOURCES}) 108 | 109 | target_link_libraries(SDL2 110 | ${LOG_LIB} 111 | ${GLES1_LIB} 112 | ${GLES2_LIB} 113 | ${ANDROID_LIB} 114 | ${DL_LIB} 115 | ) 116 | 117 | target_include_directories(SDL2 PUBLIC 118 | ${SDL_PATH}/include) 119 | 120 | set_target_properties(SDL2 PROPERTIES COMPILE_FLAGS "-DGL_GLEXT_PROTOTYPES") -------------------------------------------------------------------------------- /app/src/main/jni/deps_cmake/sdl2_image.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.4.0) 2 | 3 | project(SDL2_image C) 4 | 5 | file(GLOB SDL2_IMAGE_BASE 6 | ${SDL2_IMAGE_PATH}/*.c) 7 | 8 | set(SDL2_IMAGE_PNG_FILES 9 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/png.c 10 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngerror.c 11 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngget.c 12 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngmem.c 13 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngpread.c 14 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngread.c 15 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngrio.c 16 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngrtran.c 17 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngrutil.c 18 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngset.c 19 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngtrans.c 20 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngwio.c 21 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngwrite.c 22 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngwtran.c 23 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2/pngwutil.c 24 | ) 25 | 26 | find_library(ZLIB z) 27 | 28 | set(SDL2_IMAGE_SOURCES 29 | ${SDL2_IMAGE_BASE} 30 | ${SDL2_IMAGE_PNG_FILES} 31 | ) 32 | 33 | add_library(SDL2_image 34 | ${LIBRARIES_BUILD_TYPE} 35 | ${SDL2_IMAGE_SOURCES}) 36 | 37 | target_link_libraries(SDL2_image 38 | SDL2 39 | ${ZLIB} 40 | ) 41 | 42 | target_include_directories(SDL2_image PUBLIC 43 | SDL2_image) 44 | 45 | target_include_directories(SDL2_image PRIVATE 46 | ${SDL2_IMAGE_PATH}/external/libpng-1.6.2) 47 | 48 | set_target_properties(SDL2_image 49 | PROPERTIES 50 | COMPILE_FLAGS 51 | "-DLOAD_BMP\ 52 | -DLOAD_GIF\ 53 | -DLOAD_LBM\ 54 | -DLOAD_PCX\ 55 | -DLOAD_PNM\ 56 | -DLOAD_TGA\ 57 | -DLOAD_XCF\ 58 | -DLOAD_XPM\ 59 | -DLOAD_XV\ 60 | -DLOAD_PNG") 61 | -------------------------------------------------------------------------------- /app/src/main/jni/deps_cmake/sdl2_mixer.cmake: -------------------------------------------------------------------------------- 1 | set(SDL2_MIXER_BASE 2 | ${SDL2_MIXER_PATH}/dynamic_flac.c 3 | ${SDL2_MIXER_PATH}/dynamic_fluidsynth.c 4 | ${SDL2_MIXER_PATH}/dynamic_mod.c 5 | ${SDL2_MIXER_PATH}/dynamic_modplug.c 6 | ${SDL2_MIXER_PATH}/dynamic_mp3.c 7 | ${SDL2_MIXER_PATH}/dynamic_ogg.c 8 | ${SDL2_MIXER_PATH}/effect_position.c 9 | ${SDL2_MIXER_PATH}/effects_internal.c 10 | ${SDL2_MIXER_PATH}/effect_stereoreverse.c 11 | ${SDL2_MIXER_PATH}/fluidsynth.c 12 | ${SDL2_MIXER_PATH}/load_aiff.c 13 | ${SDL2_MIXER_PATH}/load_flac.c 14 | ${SDL2_MIXER_PATH}/load_mp3.c 15 | ${SDL2_MIXER_PATH}/load_ogg.c 16 | ${SDL2_MIXER_PATH}/load_voc.c 17 | ${SDL2_MIXER_PATH}/mixer.c 18 | ${SDL2_MIXER_PATH}/music.c 19 | ${SDL2_MIXER_PATH}/music_cmd.c 20 | ${SDL2_MIXER_PATH}/music_flac.c 21 | ${SDL2_MIXER_PATH}/music_mad.c 22 | ${SDL2_MIXER_PATH}/music_mod.c 23 | ${SDL2_MIXER_PATH}/music_modplug.c 24 | ${SDL2_MIXER_PATH}/music_ogg.c 25 | ${SDL2_MIXER_PATH}/wavestream.c 26 | ) 27 | 28 | set(SDL2_MIXER_OGG_FILES 29 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/mdct.c 30 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/block.c 31 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/window.c 32 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/synthesis.c 33 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/info.c 34 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/floor1.c 35 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/floor0.c 36 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/vorbisfile.c 37 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/res012.c 38 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/mapping0.c 39 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/registry.c 40 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/codebook.c 41 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1/sharedbook.c 42 | ${SDL2_MIXER_PATH}/external/libogg-1.3.1/src/framing.c 43 | ${SDL2_MIXER_PATH}/external/libogg-1.3.1/src/bitwise.c 44 | ) 45 | 46 | set(MIXER_FLAC_PATH external/flac-1.2.1) 47 | 48 | set(SDL2_MIXER_LIBFLAC_FILES 49 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/bitmath.c 50 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/bitreader.c 51 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/bitwriter.c 52 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/cpu.c 53 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/crc.c 54 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/fixed.c 55 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/float.c 56 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/format.c 57 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/lpc.c 58 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/md5.c 59 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/memory.c 60 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/metadata_iterators.c 61 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/metadata_object.c 62 | # ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/ogg_decoder_aspect.c 63 | # ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/ogg_encoder_aspect.c 64 | # ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/ogg_helper.c 65 | # ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/ogg_mapping.c 66 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/stream_decoder.c 67 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/stream_encoder.c 68 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/stream_encoder_framing.c 69 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/window.c 70 | ) 71 | 72 | add_library(LIBFLAC STATIC 73 | ${SDL2_MIXER_LIBFLAC_FILES}) 74 | 75 | target_include_directories(LIBFLAC 76 | PUBLIC 77 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/include) 78 | 79 | 80 | target_include_directories(LIBFLAC 81 | PRIVATE 82 | ${SDL2_MIXER_PATH}/${MIXER_FLAC_PATH}/src/libFLAC/include 83 | src/libflac_cfg) 84 | 85 | target_include_directories(LIBFLAC 86 | PRIVATE SYSTEM 87 | src/libflac_cfg) 88 | 89 | set_target_properties(LIBFLAC 90 | PROPERTIES 91 | COMPILE_FLAGS 92 | "-DHAVE_CONFIG_H") 93 | 94 | set(SDL2_MIXER_SOURCES 95 | ${SDL2_MIXER_BASE} 96 | ${SDL2_MIXER_OGG_FILES} 97 | ) 98 | 99 | set(SDL2_MIXER_CFLAGS 100 | "-DOGG_MUSIC -DOGG_USE_TREMOR -DOGG_HEADER=\"\"\ 101 | -DFLAC_MUSIC\ 102 | -DWAV_MUSIC") 103 | 104 | set(SDL2_MIXER_LIBS 105 | SDL2) 106 | 107 | if(TARGET LIBMAD) 108 | set(SDL2_MIXER_CFLAGS 109 | "${SDL2_MIXER_CFLAGS} -DMP3_MAD_MUSIC") 110 | endif(TARGET LIBMAD) 111 | 112 | add_library(SDL2_mixer 113 | ${LIBRARIES_BUILD_TYPE} 114 | ${SDL2_MIXER_SOURCES}) 115 | 116 | target_link_libraries(SDL2_mixer 117 | SDL2 118 | LIBFLAC) 119 | 120 | if(TARGET LIBMAD) 121 | target_link_libraries(SDL2_mixer 122 | LIBMAD) 123 | endif(TARGET LIBMAD) 124 | 125 | target_include_directories(SDL2_mixer PUBLIC 126 | SDL2_mixer) 127 | 128 | target_include_directories(SDL2_mixer PRIVATE 129 | ${SDL2_MIXER_PATH}/external/libvorbisidec-1.2.1 130 | ${SDL2_MIXER_PATH}/external/libogg-1.3.1/include) 131 | 132 | set_target_properties(SDL2_mixer 133 | PROPERTIES 134 | COMPILE_FLAGS 135 | ${SDL2_MIXER_CFLAGS}) 136 | -------------------------------------------------------------------------------- /app/src/main/jni/deps_cmake/sdl_gfx.cmake: -------------------------------------------------------------------------------- 1 | 2 | file(GLOB SDL_gfx_BASE 3 | ${SDL_GFX_PATH}/*.c 4 | ) 5 | 6 | set(SDL_gfx_SOURCES 7 | ${SDL_gfx_BASE} 8 | ) 9 | 10 | add_library(SDL_gfx 11 | ${LIBRARIES_BUILD_TYPE} 12 | ${SDL_gfx_SOURCES}) 13 | 14 | target_link_libraries(SDL_gfx 15 | SDL2) 16 | 17 | target_include_directories(SDL_gfx PUBLIC 18 | SDL_gfx) 19 | -------------------------------------------------------------------------------- /app/src/main/jni/deps_cmake/yaml-cpp.cmake: -------------------------------------------------------------------------------- 1 | # THIS FILE IS FOR DIRECT INCLUSION! Do not use in any other cases. 2 | 3 | # Add YAML_CPP target to the project 4 | # You should set YAML_CPP_PATH to a path to yaml-cpp sources 5 | 6 | file(GLOB YAML_CPP_SRC 7 | ${YAML_CPP_PATH}/src/*.cpp 8 | ) 9 | 10 | set(YAML_CPP_SOURCES 11 | ${YAML_CPP_SRC} 12 | ) 13 | 14 | add_library(YAML_CPP ${LIBRARIES_BUILD_TYPE} 15 | ${YAML_CPP_SOURCES} 16 | ) 17 | 18 | target_include_directories(YAML_CPP 19 | PUBLIC 20 | ${YAML_CPP_PATH}/include 21 | ) 22 | 23 | target_include_directories(YAML_CPP 24 | PRIVATE 25 | ${YAML_CPP_PATH}/src 26 | ) -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/COPYRIGHT: -------------------------------------------------------------------------------- 1 | 2 | libmad - MPEG audio decoder library 3 | Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | If you would like to negotiate alternate licensing terms, you may do 20 | so by contacting: Underbit Technologies, Inc. 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/CREDITS: -------------------------------------------------------------------------------- 1 | 2 | libmad - MPEG audio decoder library 3 | Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | 5 | $Id: CREDITS,v 1.5 2004/02/17 02:02:03 rob Exp $ 6 | 7 | =============================================================================== 8 | 9 | AUTHOR 10 | 11 | Except where otherwise noted, all code was authored by: 12 | 13 | Robert Leslie 14 | 15 | CONTRIBUTORS 16 | 17 | Significant contributions have been incorporated with thanks to: 18 | 19 | Anonymous 20 | 2002/03/15: frame.c 21 | - Reported problem with use of reserved emphasis value. 22 | 2003/08/31: layer12.c 23 | - Suggested support for certain disallowed bitrate/mode 24 | combinations. 25 | 26 | Niek Albers 27 | 2003/04/21: layer3.c 28 | - Reported runtime uninitialized use of `ptr' in designating 29 | ancillary bits after a decoding error. 30 | 31 | Christian Biere 32 | 2003/02/01: frame.c 33 | - Reported assertion failure in layer3.c due to an 34 | invalid/unsupported Layer III free format bitrate. 35 | 36 | David Blythe 37 | 2001/01/30: fixed.h 38 | - Provided initial PowerPC fixed-point assembly. 39 | 40 | Simon Burge 41 | 2000/09/20: imdct_l_arm.S 42 | - Suggested patch for a.out compatibility. 43 | 44 | Brian Cameron 45 | 2003/07/02: huffman.c 46 | - Suggested changes for improved portability. 47 | 48 | Joshua Haberman 49 | 2001/08/10: decoder.c, huffman.c 50 | - Suggested portability fixes. 51 | 52 | Timothy King 53 | 2002/05/04: sf_table.dat, layer12.c 54 | - Reported problem with use of (missing) scalefactor index 63. 55 | 56 | Felix von Leitner 57 | 2003/01/21: fixed.h 58 | - Suggested Intel scaling alternative for possible speedup. 59 | 60 | Andre McCurdy 61 | 2000/08/10: imdct_l_arm.S 62 | - ARM optimized assembly replacement for III_imdct_l(). 63 | 2000/09/15: imdct_l_arm.S 64 | - Applied Nicolas Pitre's rounding optimisation in all remaining 65 | places. 66 | 2001/02/10: layer3.c 67 | - Inspiration for Huffman decoding and requantization rewrite, and 68 | other miscellany. 69 | 2001/03/24: imdct_l_arm.S 70 | - Corrected PIC unsafe code. 71 | 2002/02/16: fixed.h 72 | - Discovered bug in ARM version of mad_f_scale64(). 73 | 74 | Haruhiko OGASAWARA 75 | 2001/01/28: layer3.c 76 | - Reported discrepancy in alias reduction for mixed short blocks. 77 | 78 | Brett Paterson 79 | 2001/10/28: global.h 80 | - Reported missing et al. under MS Embedded Visual C. 81 | 82 | Sean 'Shaleh' Perry 83 | 2000/04/04: fixed.h 84 | - Suggested use of size-dependent typedefs. 85 | 2001/10/22: config.guess, config.sub 86 | - Keep up to date for proper Debian packaging. 87 | 88 | Bertrand Petit 89 | 2001/11/05: synth.h 90 | - Suggested PCM channel enumeration constants. 91 | 2001/11/05: stream.h 92 | - Suggested MAD_ERROR_NONE enumeration constant. 93 | 2001/11/05: stream.c 94 | - Suggested mad_stream_errorstr() function. 95 | 96 | Nicolas Pitre 97 | 2000/09/09: fixed.h 98 | - Parameterized all scaling for correct use of all multiplication 99 | methods within mad_synth_frame(). 100 | - Rewrote the FPM_ARM version of mad_f_mul() so we have 64-bit 101 | multiplication result, rounding and scaling with 3 instructions. 102 | 2000/09/09: imdct_l_arm.S 103 | - Optimized rounding + scaling operations. 104 | 2000/09/17: synth.c 105 | - Changed D[] run-time shifts to compile-time. 106 | - Modified synthesis for better multiply/accumulate code output. 107 | 2001/08/11: fixed.h, synth.c 108 | - Suggested 64-bit FPM negation and negative term factorization 109 | during synthesis. 110 | 2001/08/11: fixed.h 111 | - Suggested unrounded behavior for FPM_DEFAULT when OPT_SPEED. 112 | 2001/11/19: fixed.c 113 | - Suggested computation of any resampling ratio. 114 | 115 | =============================================================================== 116 | 117 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/Makefile.am: -------------------------------------------------------------------------------- 1 | ## 2 | ## libmad - MPEG audio decoder library 3 | ## Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | ## 5 | ## This program is free software; you can redistribute it and/or modify 6 | ## it under the terms of the GNU General Public License as published by 7 | ## the Free Software Foundation; either version 2 of the License, or 8 | ## (at your option) any later version. 9 | ## 10 | ## This program is distributed in the hope that it will be useful, 11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ## GNU General Public License for more details. 14 | ## 15 | ## You should have received a copy of the GNU General Public License 16 | ## along with this program; if not, write to the Free Software 17 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | ## 19 | ## $Id: Makefile.am,v 1.23 2004/02/17 02:02:03 rob Exp $ 20 | ## 21 | 22 | ## Process this file with automake to produce Makefile.in 23 | 24 | SUBDIRS = 25 | DIST_SUBDIRS = msvc++ 26 | 27 | lib_LTLIBRARIES = libmad.la 28 | include_HEADERS = mad.h 29 | 30 | EXTRA_PROGRAMS = minimad 31 | 32 | minimad_SOURCES = minimad.c 33 | minimad_INCLUDES = 34 | minimad_LDADD = libmad.la 35 | 36 | EXTRA_DIST = mad.h.sed \ 37 | CHANGES COPYRIGHT CREDITS README TODO VERSION 38 | 39 | exported_headers = version.h fixed.h bit.h timer.h stream.h frame.h \ 40 | synth.h decoder.h 41 | 42 | headers = $(exported_headers) \ 43 | global.h layer12.h layer3.h huffman.h 44 | 45 | data_includes = D.dat imdct_s.dat qc_table.dat rq_table.dat \ 46 | sf_table.dat 47 | 48 | libmad_la_SOURCES = version.c fixed.c bit.c timer.c stream.c frame.c \ 49 | synth.c decoder.c layer12.c layer3.c huffman.c \ 50 | $(headers) $(data_includes) 51 | 52 | EXTRA_libmad_la_SOURCES = imdct_l_arm.S #synth_mmx.S 53 | 54 | libmad_la_DEPENDENCIES = @ASO_OBJS@ 55 | libmad_la_LIBADD = @ASO_OBJS@ 56 | 57 | INCLUDES = $(FPM) $(ASO) 58 | 59 | BUILT_SOURCES = mad.h 60 | CLEANFILES = mad.h 61 | 62 | ## From the libtool documentation on library versioning: 63 | ## 64 | ## CURRENT 65 | ## The most recent interface number that this library implements. 66 | ## 67 | ## REVISION 68 | ## The implementation number of the CURRENT interface. 69 | ## 70 | ## AGE 71 | ## The difference between the newest and oldest interfaces that this 72 | ## library implements. In other words, the library implements all the 73 | ## interface numbers in the range from number `CURRENT - AGE' to 74 | ## `CURRENT'. 75 | ## 76 | ## If two libraries have identical CURRENT and AGE numbers, then the 77 | ## dynamic linker chooses the library with the greater REVISION number. 78 | ## 79 | ## 1. Start with version information of `0:0:0' for each libtool library. 80 | ## 81 | ## 2. Update the version information only immediately before a public 82 | ## release of your software. More frequent updates are unnecessary, 83 | ## and only guarantee that the current interface number gets larger 84 | ## faster. 85 | ## 86 | ## 3. If the library source code has changed at all since the last 87 | ## update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). 88 | ## 89 | ## 4. If any interfaces have been added, removed, or changed since the 90 | ## last update, increment CURRENT, and set REVISION to 0. 91 | ## 92 | ## 5. If any interfaces have been added since the last public release, 93 | ## then increment AGE. 94 | ## 95 | ## 6. If any interfaces have been removed since the last public release, 96 | ## then set AGE to 0. 97 | 98 | version_current = 2 99 | version_revision = 1 100 | version_age = 2 101 | 102 | version_info = $(version_current):$(version_revision):$(version_age) 103 | 104 | libmad_la_LDFLAGS = -version-info $(version_info) 105 | 106 | mad.h: config.status config.h Makefile.am \ 107 | $(srcdir)/COPYRIGHT $(srcdir)/mad.h.sed $(exported_headers) 108 | (sed -e '1s|.*|/*|' -e '1b' -e '$$s|.*| */|' -e '$$b' \ 109 | -e 's/^.*/ *&/' $(srcdir)/COPYRIGHT; echo; \ 110 | echo "# ifdef __cplusplus"; \ 111 | echo 'extern "C" {'; \ 112 | echo "# endif"; echo; \ 113 | if [ ".$(FPM)" != "." ]; then \ 114 | echo ".$(FPM)" | sed -e 's|^\.-D|# define |'; echo; \ 115 | fi; \ 116 | sed -ne 's/^# *define *\(HAVE_.*_ASM\).*/# define \1/p' \ 117 | config.h; echo; \ 118 | sed -ne 's/^# *define *OPT_\(SPEED\|ACCURACY\).*/# define OPT_\1/p' \ 119 | config.h; echo; \ 120 | sed -ne 's/^# *define *\(SIZEOF_.*\)/# define \1/p' \ 121 | config.h; echo; \ 122 | for header in $(exported_headers); do \ 123 | echo; \ 124 | sed -n -f $(srcdir)/mad.h.sed $(srcdir)/$$header; \ 125 | done; echo; \ 126 | echo "# ifdef __cplusplus"; \ 127 | echo '}'; \ 128 | echo "# endif") >$@ 129 | 130 | libtool: $(LIBTOOL_DEPS) 131 | $(SHELL) ./config.status --recheck 132 | 133 | .c.s: 134 | $(COMPILE) -S $< 135 | 136 | again: 137 | $(MAKE) clean 138 | $(MAKE) 139 | 140 | .PHONY: again 141 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/TODO: -------------------------------------------------------------------------------- 1 | 2 | libmad - MPEG audio decoder library 3 | Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | 5 | $Id: TODO,v 1.3 2004/02/05 09:02:39 rob Exp $ 6 | 7 | =============================================================================== 8 | 9 | libmad: 10 | - more API layers (buffering, PCM samples, dithering, etc.) 11 | - x86 performance optimization compiler flags 12 | - function documentation, general docs 13 | - finish async API 14 | - parse system streams? 15 | - MPEG-2 MC, AAC? 16 | - logarithmic multiplication? 17 | - multiple frame decoding for better locality of reference? 18 | - frame serial numbers, Layer III frame continuity checks 19 | 20 | fixed.h: 21 | - experiment with FPM_INTEL: 22 | 23 | # if 1 24 | # define mad_f_scale64(hi, lo) \ 25 | ({ mad_fixed_t __result; \ 26 | asm ("shrl %3,%1\n\t" \ 27 | "shll %4,%2\n\t" \ 28 | "orl %2,%1" \ 29 | : "=rm" (__result) \ 30 | : "0" (lo), "r" (hi), \ 31 | "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ 32 | : "cc"); \ 33 | __result; \ 34 | }) 35 | # else 36 | # define mad_f_scale64(hi, lo) \ 37 | ({ mad_fixed64hi_t __hi_; \ 38 | mad_fixed64lo_t __lo_; \ 39 | mad_fixed_t __result; \ 40 | asm ("sall %2,%1" \ 41 | : "=r" (__hi_) \ 42 | : "0" (hi), "I" (32 - MAD_F_SCALEBITS) \ 43 | : "cc"); \ 44 | asm ("shrl %2,%1" \ 45 | : "=r" (__lo_) \ 46 | : "0" (lo), "I" (MAD_F_SCALEBITS) \ 47 | : "cc"); \ 48 | asm ("orl %1,%2" \ 49 | : "=rm" (__result) \ 50 | : "r" (__hi_), "0" (__lo_) \ 51 | : "cc"); \ 52 | __result; \ 53 | }) 54 | # endif 55 | 56 | libmad Layer I: 57 | - check frame length sanity 58 | 59 | libmad Layer II: 60 | - check frame length sanity 61 | 62 | libmad Layer III: 63 | - circular buffer 64 | - optimize zero_part from Huffman decoding throughout 65 | - MPEG 2.5 8000 Hz sf bands? mixed blocks? 66 | - stereo->mono conversion optimization? 67 | - enable frame-at-a-time decoding 68 | - improve portability of huffman.c 69 | 70 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/VERSION: -------------------------------------------------------------------------------- 1 | 0.15.1b 2 | configure.ac:24 3 | version.h:25-28 4 | msvc++/config.h:99,105,120 5 | msvc++/mad.h:41-44 6 | 7 | Makefile.am:98-100 8 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/bit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: bit.c,v 1.12 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifdef HAVE_CONFIG_H 23 | # include "config.h" 24 | # endif 25 | 26 | # include "global.h" 27 | 28 | # ifdef HAVE_LIMITS_H 29 | # include 30 | # else 31 | # define CHAR_BIT 8 32 | # endif 33 | 34 | # include "bit.h" 35 | 36 | /* 37 | * This is the lookup table for computing the CRC-check word. 38 | * As described in section 2.4.3.1 and depicted in Figure A.9 39 | * of ISO/IEC 11172-3, the generator polynomial is: 40 | * 41 | * G(X) = X^16 + X^15 + X^2 + 1 42 | */ 43 | static 44 | unsigned short const crc_table[256] = { 45 | 0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011, 46 | 0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022, 47 | 0x8063, 0x0066, 0x006c, 0x8069, 0x0078, 0x807d, 0x8077, 0x0072, 48 | 0x0050, 0x8055, 0x805f, 0x005a, 0x804b, 0x004e, 0x0044, 0x8041, 49 | 0x80c3, 0x00c6, 0x00cc, 0x80c9, 0x00d8, 0x80dd, 0x80d7, 0x00d2, 50 | 0x00f0, 0x80f5, 0x80ff, 0x00fa, 0x80eb, 0x00ee, 0x00e4, 0x80e1, 51 | 0x00a0, 0x80a5, 0x80af, 0x00aa, 0x80bb, 0x00be, 0x00b4, 0x80b1, 52 | 0x8093, 0x0096, 0x009c, 0x8099, 0x0088, 0x808d, 0x8087, 0x0082, 53 | 54 | 0x8183, 0x0186, 0x018c, 0x8189, 0x0198, 0x819d, 0x8197, 0x0192, 55 | 0x01b0, 0x81b5, 0x81bf, 0x01ba, 0x81ab, 0x01ae, 0x01a4, 0x81a1, 56 | 0x01e0, 0x81e5, 0x81ef, 0x01ea, 0x81fb, 0x01fe, 0x01f4, 0x81f1, 57 | 0x81d3, 0x01d6, 0x01dc, 0x81d9, 0x01c8, 0x81cd, 0x81c7, 0x01c2, 58 | 0x0140, 0x8145, 0x814f, 0x014a, 0x815b, 0x015e, 0x0154, 0x8151, 59 | 0x8173, 0x0176, 0x017c, 0x8179, 0x0168, 0x816d, 0x8167, 0x0162, 60 | 0x8123, 0x0126, 0x012c, 0x8129, 0x0138, 0x813d, 0x8137, 0x0132, 61 | 0x0110, 0x8115, 0x811f, 0x011a, 0x810b, 0x010e, 0x0104, 0x8101, 62 | 63 | 0x8303, 0x0306, 0x030c, 0x8309, 0x0318, 0x831d, 0x8317, 0x0312, 64 | 0x0330, 0x8335, 0x833f, 0x033a, 0x832b, 0x032e, 0x0324, 0x8321, 65 | 0x0360, 0x8365, 0x836f, 0x036a, 0x837b, 0x037e, 0x0374, 0x8371, 66 | 0x8353, 0x0356, 0x035c, 0x8359, 0x0348, 0x834d, 0x8347, 0x0342, 67 | 0x03c0, 0x83c5, 0x83cf, 0x03ca, 0x83db, 0x03de, 0x03d4, 0x83d1, 68 | 0x83f3, 0x03f6, 0x03fc, 0x83f9, 0x03e8, 0x83ed, 0x83e7, 0x03e2, 69 | 0x83a3, 0x03a6, 0x03ac, 0x83a9, 0x03b8, 0x83bd, 0x83b7, 0x03b2, 70 | 0x0390, 0x8395, 0x839f, 0x039a, 0x838b, 0x038e, 0x0384, 0x8381, 71 | 72 | 0x0280, 0x8285, 0x828f, 0x028a, 0x829b, 0x029e, 0x0294, 0x8291, 73 | 0x82b3, 0x02b6, 0x02bc, 0x82b9, 0x02a8, 0x82ad, 0x82a7, 0x02a2, 74 | 0x82e3, 0x02e6, 0x02ec, 0x82e9, 0x02f8, 0x82fd, 0x82f7, 0x02f2, 75 | 0x02d0, 0x82d5, 0x82df, 0x02da, 0x82cb, 0x02ce, 0x02c4, 0x82c1, 76 | 0x8243, 0x0246, 0x024c, 0x8249, 0x0258, 0x825d, 0x8257, 0x0252, 77 | 0x0270, 0x8275, 0x827f, 0x027a, 0x826b, 0x026e, 0x0264, 0x8261, 78 | 0x0220, 0x8225, 0x822f, 0x022a, 0x823b, 0x023e, 0x0234, 0x8231, 79 | 0x8213, 0x0216, 0x021c, 0x8219, 0x0208, 0x820d, 0x8207, 0x0202 80 | }; 81 | 82 | # define CRC_POLY 0x8005 83 | 84 | /* 85 | * NAME: bit->init() 86 | * DESCRIPTION: initialize bit pointer struct 87 | */ 88 | void mad_bit_init(struct mad_bitptr *bitptr, unsigned char const *byte) 89 | { 90 | bitptr->byte = byte; 91 | bitptr->cache = 0; 92 | bitptr->left = CHAR_BIT; 93 | } 94 | 95 | /* 96 | * NAME: bit->length() 97 | * DESCRIPTION: return number of bits between start and end points 98 | */ 99 | unsigned int mad_bit_length(struct mad_bitptr const *begin, 100 | struct mad_bitptr const *end) 101 | { 102 | return begin->left + 103 | CHAR_BIT * (end->byte - (begin->byte + 1)) + (CHAR_BIT - end->left); 104 | } 105 | 106 | /* 107 | * NAME: bit->nextbyte() 108 | * DESCRIPTION: return pointer to next unprocessed byte 109 | */ 110 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *bitptr) 111 | { 112 | return bitptr->left == CHAR_BIT ? bitptr->byte : bitptr->byte + 1; 113 | } 114 | 115 | /* 116 | * NAME: bit->skip() 117 | * DESCRIPTION: advance bit pointer 118 | */ 119 | void mad_bit_skip(struct mad_bitptr *bitptr, unsigned int len) 120 | { 121 | bitptr->byte += len / CHAR_BIT; 122 | bitptr->left -= len % CHAR_BIT; 123 | 124 | if (bitptr->left > CHAR_BIT) { 125 | bitptr->byte++; 126 | bitptr->left += CHAR_BIT; 127 | } 128 | 129 | if (bitptr->left < CHAR_BIT) 130 | bitptr->cache = *bitptr->byte; 131 | } 132 | 133 | /* 134 | * NAME: bit->read() 135 | * DESCRIPTION: read an arbitrary number of bits and return their UIMSBF value 136 | */ 137 | unsigned long mad_bit_read(struct mad_bitptr *bitptr, unsigned int len) 138 | { 139 | register unsigned long value; 140 | 141 | if (bitptr->left == CHAR_BIT) 142 | bitptr->cache = *bitptr->byte; 143 | 144 | if (len < bitptr->left) { 145 | value = (bitptr->cache & ((1 << bitptr->left) - 1)) >> 146 | (bitptr->left - len); 147 | bitptr->left -= len; 148 | 149 | return value; 150 | } 151 | 152 | /* remaining bits in current byte */ 153 | 154 | value = bitptr->cache & ((1 << bitptr->left) - 1); 155 | len -= bitptr->left; 156 | 157 | bitptr->byte++; 158 | bitptr->left = CHAR_BIT; 159 | 160 | /* more bytes */ 161 | 162 | while (len >= CHAR_BIT) { 163 | value = (value << CHAR_BIT) | *bitptr->byte++; 164 | len -= CHAR_BIT; 165 | } 166 | 167 | if (len > 0) { 168 | bitptr->cache = *bitptr->byte; 169 | 170 | value = (value << len) | (bitptr->cache >> (CHAR_BIT - len)); 171 | bitptr->left -= len; 172 | } 173 | 174 | return value; 175 | } 176 | 177 | # if 0 178 | /* 179 | * NAME: bit->write() 180 | * DESCRIPTION: write an arbitrary number of bits 181 | */ 182 | void mad_bit_write(struct mad_bitptr *bitptr, unsigned int len, 183 | unsigned long value) 184 | { 185 | unsigned char *ptr; 186 | 187 | ptr = (unsigned char *) bitptr->byte; 188 | 189 | /* ... */ 190 | } 191 | # endif 192 | 193 | /* 194 | * NAME: bit->crc() 195 | * DESCRIPTION: compute CRC-check word 196 | */ 197 | unsigned short mad_bit_crc(struct mad_bitptr bitptr, unsigned int len, 198 | unsigned short init) 199 | { 200 | register unsigned int crc; 201 | 202 | for (crc = init; len >= 32; len -= 32) { 203 | register unsigned long data; 204 | 205 | data = mad_bit_read(&bitptr, 32); 206 | 207 | crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 24)) & 0xff]; 208 | crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 16)) & 0xff]; 209 | crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 8)) & 0xff]; 210 | crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 0)) & 0xff]; 211 | } 212 | 213 | switch (len / 8) { 214 | case 3: crc = (crc << 8) ^ 215 | crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; 216 | case 2: crc = (crc << 8) ^ 217 | crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; 218 | case 1: crc = (crc << 8) ^ 219 | crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; 220 | 221 | len %= 8; 222 | 223 | case 0: break; 224 | } 225 | 226 | while (len--) { 227 | register unsigned int msb; 228 | 229 | msb = mad_bit_read(&bitptr, 1) ^ (crc >> 15); 230 | 231 | crc <<= 1; 232 | if (msb & 1) 233 | crc ^= CRC_POLY; 234 | } 235 | 236 | return crc & 0xffff; 237 | } 238 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/bit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_BIT_H 23 | # define LIBMAD_BIT_H 24 | 25 | struct mad_bitptr { 26 | unsigned char const *byte; 27 | unsigned short cache; 28 | unsigned short left; 29 | }; 30 | 31 | void mad_bit_init(struct mad_bitptr *, unsigned char const *); 32 | 33 | # define mad_bit_finish(bitptr) /* nothing */ 34 | 35 | unsigned int mad_bit_length(struct mad_bitptr const *, 36 | struct mad_bitptr const *); 37 | 38 | # define mad_bit_bitsleft(bitptr) ((bitptr)->left) 39 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); 40 | 41 | void mad_bit_skip(struct mad_bitptr *, unsigned int); 42 | unsigned long mad_bit_read(struct mad_bitptr *, unsigned int); 43 | void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long); 44 | 45 | unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); 46 | 47 | # endif 48 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated by configure. */ 2 | /* config.h.in. Generated from configure.ac by autoheader. */ 3 | 4 | /* Define to enable diagnostic debugging support. */ 5 | /* #undef DEBUG */ 6 | 7 | /* Define to enable experimental code. */ 8 | /* #undef EXPERIMENTAL */ 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_ASSERT_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_DLFCN_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_ERRNO_H 1 18 | 19 | /* Define to 1 if you have the `fcntl' function. */ 20 | #define HAVE_FCNTL 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_FCNTL_H 1 24 | 25 | /* Define to 1 if you have the `fork' function. */ 26 | #define HAVE_FORK 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_INTTYPES_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_LIMITS_H 1 33 | 34 | /* Define if your MIPS CPU supports a 2-operand MADD16 instruction. */ 35 | /* #undef HAVE_MADD16_ASM */ 36 | 37 | /* Define if your MIPS CPU supports a 2-operand MADD instruction. */ 38 | /* #undef HAVE_MADD_ASM */ 39 | 40 | /* Define to 1 if you have the header file. */ 41 | #define HAVE_MEMORY_H 1 42 | 43 | /* Define to 1 if you have the `pipe' function. */ 44 | #define HAVE_PIPE 1 45 | 46 | /* Define to 1 if you have the header file. */ 47 | #define HAVE_STDINT_H 1 48 | 49 | /* Define to 1 if you have the header file. */ 50 | #define HAVE_STDLIB_H 1 51 | 52 | /* Define to 1 if you have the header file. */ 53 | #define HAVE_STRINGS_H 1 54 | 55 | /* Define to 1 if you have the header file. */ 56 | #define HAVE_STRING_H 1 57 | 58 | /* Define to 1 if you have the header file. */ 59 | #define HAVE_SYS_STAT_H 1 60 | 61 | /* Define to 1 if you have the header file. */ 62 | #define HAVE_SYS_TYPES_H 1 63 | 64 | /* Define to 1 if you have that is POSIX.1 compatible. */ 65 | #define HAVE_SYS_WAIT_H 1 66 | 67 | /* Define to 1 if you have the header file. */ 68 | #define HAVE_UNISTD_H 1 69 | 70 | /* Define to 1 if you have the `waitpid' function. */ 71 | #define HAVE_WAITPID 1 72 | 73 | /* Define to disable debugging assertions. */ 74 | /* #undef NDEBUG */ 75 | 76 | /* Define to optimize for accuracy over speed. */ 77 | /* #undef OPT_ACCURACY */ 78 | 79 | /* Define to optimize for speed over accuracy. */ 80 | /* #undef OPT_SPEED */ 81 | 82 | /* Define to enable a fast subband synthesis approximation optimization. */ 83 | /* #undef OPT_SSO */ 84 | 85 | /* Define to influence a strict interpretation of the ISO/IEC standards, even 86 | if this is in opposition with best accepted practices. */ 87 | /* #undef OPT_STRICT */ 88 | 89 | /* Name of package */ 90 | #define PACKAGE "libmad" 91 | 92 | /* Define to the address where bug reports for this package should be sent. */ 93 | #define PACKAGE_BUGREPORT "support@underbit.com" 94 | 95 | /* Define to the full name of this package. */ 96 | #define PACKAGE_NAME "MPEG Audio Decoder" 97 | 98 | /* Define to the full name and version of this package. */ 99 | #define PACKAGE_STRING "MPEG Audio Decoder 0.15.1b" 100 | 101 | /* Define to the one symbol short name of this package. */ 102 | #define PACKAGE_TARNAME "libmad" 103 | 104 | /* Define to the version of this package. */ 105 | #define PACKAGE_VERSION "0.15.1b" 106 | 107 | /* The size of a `int', as computed by sizeof. */ 108 | #define SIZEOF_INT 4 109 | 110 | /* The size of a `long', as computed by sizeof. */ 111 | #define SIZEOF_LONG 8 112 | 113 | /* The size of a `long long', as computed by sizeof. */ 114 | #define SIZEOF_LONG_LONG 8 115 | 116 | /* Define to 1 if you have the ANSI C header files. */ 117 | #define STDC_HEADERS 1 118 | 119 | /* Version number of package */ 120 | #define VERSION "0.15.1b" 121 | 122 | /* Define to 1 if your processor stores words with the most significant byte 123 | first (like Motorola and SPARC, unlike Intel and VAX). */ 124 | /* #undef WORDS_BIGENDIAN */ 125 | 126 | /* Define to empty if `const' does not conform to ANSI C. */ 127 | /* #undef const */ 128 | 129 | /* Define to `__inline__' or `__inline' if that's what the C compiler 130 | calls it, or to nothing if 'inline' is not supported under any name. */ 131 | #ifndef __cplusplus 132 | /* #undef inline */ 133 | #endif 134 | 135 | /* Define to `int' if does not define. */ 136 | /* #undef pid_t */ 137 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to enable diagnostic debugging support. */ 4 | #undef DEBUG 5 | 6 | /* Define to enable experimental code. */ 7 | #undef EXPERIMENTAL 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_ASSERT_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_DLFCN_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_ERRNO_H 17 | 18 | /* Define to 1 if you have the `fcntl' function. */ 19 | #undef HAVE_FCNTL 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_FCNTL_H 23 | 24 | /* Define to 1 if you have the `fork' function. */ 25 | #undef HAVE_FORK 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_INTTYPES_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_LIMITS_H 32 | 33 | /* Define if your MIPS CPU supports a 2-operand MADD16 instruction. */ 34 | #undef HAVE_MADD16_ASM 35 | 36 | /* Define if your MIPS CPU supports a 2-operand MADD instruction. */ 37 | #undef HAVE_MADD_ASM 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #undef HAVE_MEMORY_H 41 | 42 | /* Define to 1 if you have the `pipe' function. */ 43 | #undef HAVE_PIPE 44 | 45 | /* Define to 1 if you have the header file. */ 46 | #undef HAVE_STDINT_H 47 | 48 | /* Define to 1 if you have the header file. */ 49 | #undef HAVE_STDLIB_H 50 | 51 | /* Define to 1 if you have the header file. */ 52 | #undef HAVE_STRINGS_H 53 | 54 | /* Define to 1 if you have the header file. */ 55 | #undef HAVE_STRING_H 56 | 57 | /* Define to 1 if you have the header file. */ 58 | #undef HAVE_SYS_STAT_H 59 | 60 | /* Define to 1 if you have the header file. */ 61 | #undef HAVE_SYS_TYPES_H 62 | 63 | /* Define to 1 if you have that is POSIX.1 compatible. */ 64 | #undef HAVE_SYS_WAIT_H 65 | 66 | /* Define to 1 if you have the header file. */ 67 | #undef HAVE_UNISTD_H 68 | 69 | /* Define to 1 if you have the `waitpid' function. */ 70 | #undef HAVE_WAITPID 71 | 72 | /* Define to disable debugging assertions. */ 73 | #undef NDEBUG 74 | 75 | /* Define to optimize for accuracy over speed. */ 76 | #undef OPT_ACCURACY 77 | 78 | /* Define to optimize for speed over accuracy. */ 79 | #undef OPT_SPEED 80 | 81 | /* Define to enable a fast subband synthesis approximation optimization. */ 82 | #undef OPT_SSO 83 | 84 | /* Define to influence a strict interpretation of the ISO/IEC standards, even 85 | if this is in opposition with best accepted practices. */ 86 | #undef OPT_STRICT 87 | 88 | /* Name of package */ 89 | #undef PACKAGE 90 | 91 | /* Define to the address where bug reports for this package should be sent. */ 92 | #undef PACKAGE_BUGREPORT 93 | 94 | /* Define to the full name of this package. */ 95 | #undef PACKAGE_NAME 96 | 97 | /* Define to the full name and version of this package. */ 98 | #undef PACKAGE_STRING 99 | 100 | /* Define to the one symbol short name of this package. */ 101 | #undef PACKAGE_TARNAME 102 | 103 | /* Define to the version of this package. */ 104 | #undef PACKAGE_VERSION 105 | 106 | /* The size of a `int', as computed by sizeof. */ 107 | #undef SIZEOF_INT 108 | 109 | /* The size of a `long', as computed by sizeof. */ 110 | #undef SIZEOF_LONG 111 | 112 | /* The size of a `long long', as computed by sizeof. */ 113 | #undef SIZEOF_LONG_LONG 114 | 115 | /* Define to 1 if you have the ANSI C header files. */ 116 | #undef STDC_HEADERS 117 | 118 | /* Version number of package */ 119 | #undef VERSION 120 | 121 | /* Define to 1 if your processor stores words with the most significant byte 122 | first (like Motorola and SPARC, unlike Intel and VAX). */ 123 | #undef WORDS_BIGENDIAN 124 | 125 | /* Define to empty if `const' does not conform to ANSI C. */ 126 | #undef const 127 | 128 | /* Define to `__inline__' or `__inline' if that's what the C compiler 129 | calls it, or to nothing if 'inline' is not supported under any name. */ 130 | #ifndef __cplusplus 131 | #undef inline 132 | #endif 133 | 134 | /* Define to `int' if does not define. */ 135 | #undef pid_t 136 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_DECODER_H 23 | # define LIBMAD_DECODER_H 24 | 25 | # include "stream.h" 26 | # include "frame.h" 27 | # include "synth.h" 28 | 29 | enum mad_decoder_mode { 30 | MAD_DECODER_MODE_SYNC = 0, 31 | MAD_DECODER_MODE_ASYNC 32 | }; 33 | 34 | enum mad_flow { 35 | MAD_FLOW_CONTINUE = 0x0000, /* continue normally */ 36 | MAD_FLOW_STOP = 0x0010, /* stop decoding normally */ 37 | MAD_FLOW_BREAK = 0x0011, /* stop decoding and signal an error */ 38 | MAD_FLOW_IGNORE = 0x0020 /* ignore the current frame */ 39 | }; 40 | 41 | struct mad_decoder { 42 | enum mad_decoder_mode mode; 43 | 44 | int options; 45 | 46 | struct { 47 | long pid; 48 | int in; 49 | int out; 50 | } async; 51 | 52 | struct { 53 | struct mad_stream stream; 54 | struct mad_frame frame; 55 | struct mad_synth synth; 56 | } *sync; 57 | 58 | void *cb_data; 59 | 60 | enum mad_flow (*input_func)(void *, struct mad_stream *); 61 | enum mad_flow (*header_func)(void *, struct mad_header const *); 62 | enum mad_flow (*filter_func)(void *, 63 | struct mad_stream const *, struct mad_frame *); 64 | enum mad_flow (*output_func)(void *, 65 | struct mad_header const *, struct mad_pcm *); 66 | enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); 67 | enum mad_flow (*message_func)(void *, void *, unsigned int *); 68 | }; 69 | 70 | void mad_decoder_init(struct mad_decoder *, void *, 71 | enum mad_flow (*)(void *, struct mad_stream *), 72 | enum mad_flow (*)(void *, struct mad_header const *), 73 | enum mad_flow (*)(void *, 74 | struct mad_stream const *, 75 | struct mad_frame *), 76 | enum mad_flow (*)(void *, 77 | struct mad_header const *, 78 | struct mad_pcm *), 79 | enum mad_flow (*)(void *, 80 | struct mad_stream *, 81 | struct mad_frame *), 82 | enum mad_flow (*)(void *, void *, unsigned int *)); 83 | int mad_decoder_finish(struct mad_decoder *); 84 | 85 | # define mad_decoder_options(decoder, opts) \ 86 | ((void) ((decoder)->options = (opts))) 87 | 88 | int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode); 89 | int mad_decoder_message(struct mad_decoder *, void *, unsigned int *); 90 | 91 | # endif 92 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/fixed.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: fixed.c,v 1.13 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifdef HAVE_CONFIG_H 23 | # include "config.h" 24 | # endif 25 | 26 | # include "global.h" 27 | 28 | # include "fixed.h" 29 | 30 | /* 31 | * NAME: fixed->abs() 32 | * DESCRIPTION: return absolute value of a fixed-point number 33 | */ 34 | mad_fixed_t mad_f_abs(mad_fixed_t x) 35 | { 36 | return x < 0 ? -x : x; 37 | } 38 | 39 | /* 40 | * NAME: fixed->div() 41 | * DESCRIPTION: perform division using fixed-point math 42 | */ 43 | mad_fixed_t mad_f_div(mad_fixed_t x, mad_fixed_t y) 44 | { 45 | mad_fixed_t q, r; 46 | unsigned int bits; 47 | 48 | q = mad_f_abs(x / y); 49 | 50 | if (x < 0) { 51 | x = -x; 52 | y = -y; 53 | } 54 | 55 | r = x % y; 56 | 57 | if (y < 0) { 58 | x = -x; 59 | y = -y; 60 | } 61 | 62 | if (q > mad_f_intpart(MAD_F_MAX) && 63 | !(q == -mad_f_intpart(MAD_F_MIN) && r == 0 && (x < 0) != (y < 0))) 64 | return 0; 65 | 66 | for (bits = MAD_F_FRACBITS; bits && r; --bits) { 67 | q <<= 1, r <<= 1; 68 | if (r >= y) 69 | r -= y, ++q; 70 | } 71 | 72 | /* round */ 73 | if (2 * r >= y) 74 | ++q; 75 | 76 | /* fix sign */ 77 | if ((x < 0) != (y < 0)) 78 | q = -q; 79 | 80 | return q << bits; 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/frame.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_FRAME_H 23 | # define LIBMAD_FRAME_H 24 | 25 | # include "fixed.h" 26 | # include "timer.h" 27 | # include "stream.h" 28 | 29 | enum mad_layer { 30 | MAD_LAYER_I = 1, /* Layer I */ 31 | MAD_LAYER_II = 2, /* Layer II */ 32 | MAD_LAYER_III = 3 /* Layer III */ 33 | }; 34 | 35 | enum mad_mode { 36 | MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ 37 | MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ 38 | MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ 39 | MAD_MODE_STEREO = 3 /* normal LR stereo */ 40 | }; 41 | 42 | enum mad_emphasis { 43 | MAD_EMPHASIS_NONE = 0, /* no emphasis */ 44 | MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ 45 | MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ 46 | MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ 47 | }; 48 | 49 | struct mad_header { 50 | enum mad_layer layer; /* audio layer (1, 2, or 3) */ 51 | enum mad_mode mode; /* channel mode (see above) */ 52 | int mode_extension; /* additional mode info */ 53 | enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ 54 | 55 | unsigned long bitrate; /* stream bitrate (bps) */ 56 | unsigned int samplerate; /* sampling frequency (Hz) */ 57 | 58 | unsigned short crc_check; /* frame CRC accumulator */ 59 | unsigned short crc_target; /* final target CRC checksum */ 60 | 61 | int flags; /* flags (see below) */ 62 | int private_bits; /* private bits (see below) */ 63 | 64 | mad_timer_t duration; /* audio playing time of frame */ 65 | }; 66 | 67 | struct mad_frame { 68 | struct mad_header header; /* MPEG audio header */ 69 | 70 | int options; /* decoding options (from stream) */ 71 | 72 | mad_fixed_t sbsample[2][36][32]; /* synthesis subband filter samples */ 73 | mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ 74 | }; 75 | 76 | # define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) 77 | # define MAD_NSBSAMPLES(header) \ 78 | ((header)->layer == MAD_LAYER_I ? 12 : \ 79 | (((header)->layer == MAD_LAYER_III && \ 80 | ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) 81 | 82 | enum { 83 | MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ 84 | MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ 85 | 86 | MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ 87 | MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ 88 | MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ 89 | MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ 90 | 91 | MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ 92 | MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ 93 | MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ 94 | 95 | MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ 96 | MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ 97 | MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ 98 | }; 99 | 100 | enum { 101 | MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ 102 | MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ 103 | }; 104 | 105 | void mad_header_init(struct mad_header *); 106 | 107 | # define mad_header_finish(header) /* nothing */ 108 | 109 | int mad_header_decode(struct mad_header *, struct mad_stream *); 110 | 111 | void mad_frame_init(struct mad_frame *); 112 | void mad_frame_finish(struct mad_frame *); 113 | 114 | int mad_frame_decode(struct mad_frame *, struct mad_stream *); 115 | 116 | void mad_frame_mute(struct mad_frame *); 117 | 118 | # endif 119 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/global.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: global.h,v 1.11 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_GLOBAL_H 23 | # define LIBMAD_GLOBAL_H 24 | 25 | /* conditional debugging */ 26 | 27 | # if defined(DEBUG) && defined(NDEBUG) 28 | # error "cannot define both DEBUG and NDEBUG" 29 | # endif 30 | 31 | # if defined(DEBUG) 32 | # include 33 | # endif 34 | 35 | /* conditional features */ 36 | 37 | # if defined(OPT_SPEED) && defined(OPT_ACCURACY) 38 | # error "cannot optimize for both speed and accuracy" 39 | # endif 40 | 41 | # if defined(OPT_SPEED) && !defined(OPT_SSO) 42 | # define OPT_SSO 43 | # endif 44 | 45 | # if defined(HAVE_UNISTD_H) && defined(HAVE_WAITPID) && \ 46 | defined(HAVE_FCNTL) && defined(HAVE_PIPE) && defined(HAVE_FORK) 47 | # define USE_ASYNC 48 | # endif 49 | 50 | # if !defined(HAVE_ASSERT_H) 51 | # if defined(NDEBUG) 52 | # define assert(x) /* nothing */ 53 | # else 54 | # define assert(x) do { if (!(x)) abort(); } while (0) 55 | # endif 56 | # endif 57 | 58 | # endif 59 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/huffman.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: huffman.h,v 1.11 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_HUFFMAN_H 23 | # define LIBMAD_HUFFMAN_H 24 | 25 | union huffquad { 26 | struct { 27 | unsigned short final : 1; 28 | unsigned short bits : 3; 29 | unsigned short offset : 12; 30 | } ptr; 31 | struct { 32 | unsigned short final : 1; 33 | unsigned short hlen : 3; 34 | unsigned short v : 1; 35 | unsigned short w : 1; 36 | unsigned short x : 1; 37 | unsigned short y : 1; 38 | } value; 39 | unsigned short final : 1; 40 | }; 41 | 42 | union huffpair { 43 | struct { 44 | unsigned short final : 1; 45 | unsigned short bits : 3; 46 | unsigned short offset : 12; 47 | } ptr; 48 | struct { 49 | unsigned short final : 1; 50 | unsigned short hlen : 3; 51 | unsigned short x : 4; 52 | unsigned short y : 4; 53 | } value; 54 | unsigned short final : 1; 55 | }; 56 | 57 | struct hufftable { 58 | union huffpair const *table; 59 | unsigned short linbits; 60 | unsigned short startbits; 61 | }; 62 | 63 | extern union huffquad const *const mad_huff_quad_table[2]; 64 | extern struct hufftable const mad_huff_pair_table[32]; 65 | 66 | # endif 67 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/imdct_s.dat: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: imdct_s.dat,v 1.8 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | /* 0 */ { MAD_F(0x09bd7ca0) /* 0.608761429 */, 23 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 24 | -MAD_F(0x0216a2a2) /* -0.130526192 */, 25 | MAD_F(0x0fdcf549) /* 0.991444861 */, 26 | -MAD_F(0x061f78aa) /* -0.382683432 */, 27 | -MAD_F(0x0cb19346) /* -0.793353340 */ }, 28 | 29 | /* 6 */ { -MAD_F(0x0cb19346) /* -0.793353340 */, 30 | MAD_F(0x061f78aa) /* 0.382683432 */, 31 | MAD_F(0x0fdcf549) /* 0.991444861 */, 32 | MAD_F(0x0216a2a2) /* 0.130526192 */, 33 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 34 | -MAD_F(0x09bd7ca0) /* -0.608761429 */ }, 35 | 36 | /* 1 */ { MAD_F(0x061f78aa) /* 0.382683432 */, 37 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 38 | MAD_F(0x0ec835e8) /* 0.923879533 */, 39 | -MAD_F(0x061f78aa) /* -0.382683432 */, 40 | -MAD_F(0x061f78aa) /* -0.382683432 */, 41 | MAD_F(0x0ec835e8) /* 0.923879533 */ }, 42 | 43 | /* 7 */ { -MAD_F(0x0ec835e8) /* -0.923879533 */, 44 | -MAD_F(0x061f78aa) /* -0.382683432 */, 45 | MAD_F(0x061f78aa) /* 0.382683432 */, 46 | MAD_F(0x0ec835e8) /* 0.923879533 */, 47 | MAD_F(0x0ec835e8) /* 0.923879533 */, 48 | MAD_F(0x061f78aa) /* 0.382683432 */ }, 49 | 50 | /* 2 */ { MAD_F(0x0216a2a2) /* 0.130526192 */, 51 | -MAD_F(0x061f78aa) /* -0.382683432 */, 52 | MAD_F(0x09bd7ca0) /* 0.608761429 */, 53 | -MAD_F(0x0cb19346) /* -0.793353340 */, 54 | MAD_F(0x0ec835e8) /* 0.923879533 */, 55 | -MAD_F(0x0fdcf549) /* -0.991444861 */ }, 56 | 57 | /* 8 */ { -MAD_F(0x0fdcf549) /* -0.991444861 */, 58 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 59 | -MAD_F(0x0cb19346) /* -0.793353340 */, 60 | -MAD_F(0x09bd7ca0) /* -0.608761429 */, 61 | -MAD_F(0x061f78aa) /* -0.382683432 */, 62 | -MAD_F(0x0216a2a2) /* -0.130526192 */ } 63 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # install - install a program, script, or datafile 4 | # This comes from X11R5 (mit/util/scripts/install.sh). 5 | # 6 | # Copyright 1991 by the Massachusetts Institute of Technology 7 | # 8 | # Permission to use, copy, modify, distribute, and sell this software and its 9 | # documentation for any purpose is hereby granted without fee, provided that 10 | # the above copyright notice appear in all copies and that both that 11 | # copyright notice and this permission notice appear in supporting 12 | # documentation, and that the name of M.I.T. not be used in advertising or 13 | # publicity pertaining to distribution of the software without specific, 14 | # written prior permission. M.I.T. makes no representations about the 15 | # suitability of this software for any purpose. It is provided "as is" 16 | # without express or implied warranty. 17 | # 18 | # Calling this script install-sh is preferred over install.sh, to prevent 19 | # `make' implicit rules from creating a file called install from it 20 | # when there is no Makefile. 21 | # 22 | # This script is compatible with the BSD install script, but was written 23 | # from scratch. It can only install one file at a time, a restriction 24 | # shared with many OS's install programs. 25 | 26 | 27 | # set DOITPROG to echo to test this script 28 | 29 | # Don't use :- since 4.3BSD and earlier shells don't like it. 30 | doit="${DOITPROG-}" 31 | 32 | 33 | # put in absolute paths if you don't have them in your path; or use env. vars. 34 | 35 | mvprog="${MVPROG-mv}" 36 | cpprog="${CPPROG-cp}" 37 | chmodprog="${CHMODPROG-chmod}" 38 | chownprog="${CHOWNPROG-chown}" 39 | chgrpprog="${CHGRPPROG-chgrp}" 40 | stripprog="${STRIPPROG-strip}" 41 | rmprog="${RMPROG-rm}" 42 | mkdirprog="${MKDIRPROG-mkdir}" 43 | 44 | transformbasename="" 45 | transform_arg="" 46 | instcmd="$mvprog" 47 | chmodcmd="$chmodprog 0755" 48 | chowncmd="" 49 | chgrpcmd="" 50 | stripcmd="" 51 | rmcmd="$rmprog -f" 52 | mvcmd="$mvprog" 53 | src="" 54 | dst="" 55 | dir_arg="" 56 | 57 | while [ x"$1" != x ]; do 58 | case $1 in 59 | -c) instcmd=$cpprog 60 | shift 61 | continue;; 62 | 63 | -d) dir_arg=true 64 | shift 65 | continue;; 66 | 67 | -m) chmodcmd="$chmodprog $2" 68 | shift 69 | shift 70 | continue;; 71 | 72 | -o) chowncmd="$chownprog $2" 73 | shift 74 | shift 75 | continue;; 76 | 77 | -g) chgrpcmd="$chgrpprog $2" 78 | shift 79 | shift 80 | continue;; 81 | 82 | -s) stripcmd=$stripprog 83 | shift 84 | continue;; 85 | 86 | -t=*) transformarg=`echo $1 | sed 's/-t=//'` 87 | shift 88 | continue;; 89 | 90 | -b=*) transformbasename=`echo $1 | sed 's/-b=//'` 91 | shift 92 | continue;; 93 | 94 | *) if [ x"$src" = x ] 95 | then 96 | src=$1 97 | else 98 | # this colon is to work around a 386BSD /bin/sh bug 99 | : 100 | dst=$1 101 | fi 102 | shift 103 | continue;; 104 | esac 105 | done 106 | 107 | if [ x"$src" = x ] 108 | then 109 | echo "$0: no input file specified" >&2 110 | exit 1 111 | else 112 | : 113 | fi 114 | 115 | if [ x"$dir_arg" != x ]; then 116 | dst=$src 117 | src="" 118 | 119 | if [ -d "$dst" ]; then 120 | instcmd=: 121 | chmodcmd="" 122 | else 123 | instcmd=$mkdirprog 124 | fi 125 | else 126 | 127 | # Waiting for this to be detected by the "$instcmd $src $dsttmp" command 128 | # might cause directories to be created, which would be especially bad 129 | # if $src (and thus $dsttmp) contains '*'. 130 | 131 | if [ -f "$src" ] || [ -d "$src" ] 132 | then 133 | : 134 | else 135 | echo "$0: $src does not exist" >&2 136 | exit 1 137 | fi 138 | 139 | if [ x"$dst" = x ] 140 | then 141 | echo "$0: no destination specified" >&2 142 | exit 1 143 | else 144 | : 145 | fi 146 | 147 | # If destination is a directory, append the input filename; if your system 148 | # does not like double slashes in filenames, you may need to add some logic 149 | 150 | if [ -d "$dst" ] 151 | then 152 | dst=$dst/`basename "$src"` 153 | else 154 | : 155 | fi 156 | fi 157 | 158 | ## this sed command emulates the dirname command 159 | dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` 160 | 161 | # Make sure that the destination directory exists. 162 | # this part is taken from Noah Friedman's mkinstalldirs script 163 | 164 | # Skip lots of stat calls in the usual case. 165 | if [ ! -d "$dstdir" ]; then 166 | defaultIFS=' 167 | ' 168 | IFS="${IFS-$defaultIFS}" 169 | 170 | oIFS=$IFS 171 | # Some sh's can't handle IFS=/ for some reason. 172 | IFS='%' 173 | set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` 174 | IFS=$oIFS 175 | 176 | pathcomp='' 177 | 178 | while [ $# -ne 0 ] ; do 179 | pathcomp=$pathcomp$1 180 | shift 181 | 182 | if [ ! -d "$pathcomp" ] ; 183 | then 184 | $mkdirprog "$pathcomp" 185 | else 186 | : 187 | fi 188 | 189 | pathcomp=$pathcomp/ 190 | done 191 | fi 192 | 193 | if [ x"$dir_arg" != x ] 194 | then 195 | $doit $instcmd "$dst" && 196 | 197 | if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && 198 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && 199 | if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && 200 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi 201 | else 202 | 203 | # If we're going to rename the final executable, determine the name now. 204 | 205 | if [ x"$transformarg" = x ] 206 | then 207 | dstfile=`basename "$dst"` 208 | else 209 | dstfile=`basename "$dst" $transformbasename | 210 | sed $transformarg`$transformbasename 211 | fi 212 | 213 | # don't allow the sed command to completely eliminate the filename 214 | 215 | if [ x"$dstfile" = x ] 216 | then 217 | dstfile=`basename "$dst"` 218 | else 219 | : 220 | fi 221 | 222 | # Make a couple of temp file names in the proper directory. 223 | 224 | dsttmp=$dstdir/#inst.$$# 225 | rmtmp=$dstdir/#rm.$$# 226 | 227 | # Trap to clean up temp files at exit. 228 | 229 | trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 230 | trap '(exit $?); exit' 1 2 13 15 231 | 232 | # Move or copy the file name to the temp name 233 | 234 | $doit $instcmd "$src" "$dsttmp" && 235 | 236 | # and set any options; do chmod last to preserve setuid bits 237 | 238 | # If any of these fail, we abort the whole thing. If we want to 239 | # ignore errors from any of these, just make sure not to ignore 240 | # errors from the above "$doit $instcmd $src $dsttmp" command. 241 | 242 | if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && 243 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && 244 | if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && 245 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && 246 | 247 | # Now remove or move aside any old file at destination location. We try this 248 | # two ways since rm can't unlink itself on some systems and the destination 249 | # file might be busy for other reasons. In this case, the final cleanup 250 | # might fail but the new file should still install successfully. 251 | 252 | { 253 | if [ -f "$dstdir/$dstfile" ] 254 | then 255 | $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || 256 | $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || 257 | { 258 | echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 259 | (exit 1); exit 260 | } 261 | else 262 | : 263 | fi 264 | } && 265 | 266 | # Now rename the file to the real destination. 267 | 268 | $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" 269 | 270 | fi && 271 | 272 | # The final little trick to "correctly" pass the exit status to the exit trap. 273 | 274 | { 275 | (exit 0); exit 276 | } 277 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/layer12.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: layer12.h,v 1.10 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_LAYER12_H 23 | # define LIBMAD_LAYER12_H 24 | 25 | # include "stream.h" 26 | # include "frame.h" 27 | 28 | int mad_layer_I(struct mad_stream *, struct mad_frame *); 29 | int mad_layer_II(struct mad_stream *, struct mad_frame *); 30 | 31 | # endif 32 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/layer3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: layer3.h,v 1.10 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_LAYER3_H 23 | # define LIBMAD_LAYER3_H 24 | 25 | # include "stream.h" 26 | # include "frame.h" 27 | 28 | int mad_layer_III(struct mad_stream *, struct mad_frame *); 29 | 30 | # endif 31 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/libmad.list: -------------------------------------------------------------------------------- 1 | # libmad.list. Generated from libmad.list.in by configure. 2 | 3 | # Directories... 4 | $prefix=/usr/local 5 | $exec_prefix=${prefix} 6 | $srcdir=. 7 | 8 | # Product information 9 | %product libmad 10 | %copyright GPL 11 | %vendor Underbit Technologies, Inc. 12 | %license ./COPYING 13 | %readme ./README 14 | %description libmad is an MPEG audio decoder library. 15 | %version 0.15.1b 16 | %packager Giuseppe "Cowo" Corbelli 17 | 18 | %system all 19 | f 0755 root root ${exec_prefix}/lib/libmad.la .libs/libmad.lai 20 | f 0644 root root ${exec_prefix}/lib/libmad.a .libs/libmad.a 21 | f 0644 root root ${prefix}/include/mad.h mad.h 22 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/libmad.list.in: -------------------------------------------------------------------------------- 1 | # @configure_input@ 2 | 3 | # Directories... 4 | $prefix=@prefix@ 5 | $exec_prefix=@exec_prefix@ 6 | $srcdir=@srcdir@ 7 | 8 | # Product information 9 | %product @PACKAGE@ 10 | %copyright GPL 11 | %vendor Underbit Technologies, Inc. 12 | %license @srcdir@/COPYING 13 | %readme @srcdir@/README 14 | %description libmad is an MPEG audio decoder library. 15 | %version @VERSION@ 16 | %packager Giuseppe "Cowo" Corbelli 17 | 18 | %system all 19 | f 0755 root root @libdir@/libmad.la .libs/libmad.lai 20 | f 0644 root root @libdir@/libmad.a .libs/libmad.a 21 | f 0644 root root @includedir@/mad.h mad.h 22 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/mad.h.sed: -------------------------------------------------------------------------------- 1 | # 2 | # libmad - MPEG audio decoder library 3 | # Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | # 19 | # $Id: mad.h.sed,v 1.9 2004/01/23 09:41:32 rob Exp $ 20 | # 21 | 22 | /^\/\*$/{ 23 | N 24 | s/ \* libmad - /&/ 25 | t copy 26 | b next 27 | : copy 28 | g 29 | n 30 | s|^ \* \$\(Id: .*\) \$$|/* \1 */|p 31 | /^ \*\/$/d 32 | b copy 33 | } 34 | /^# *include "/d 35 | : next 36 | p 37 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/minimad.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: minimad.c,v 1.4 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # include 23 | # include 24 | # include 25 | # include 26 | 27 | # include "mad.h" 28 | 29 | /* 30 | * This is perhaps the simplest example use of the MAD high-level API. 31 | * Standard input is mapped into memory via mmap(), then the high-level API 32 | * is invoked with three callbacks: input, output, and error. The output 33 | * callback converts MAD's high-resolution PCM samples to 16 bits, then 34 | * writes them to standard output in little-endian, stereo-interleaved 35 | * format. 36 | */ 37 | 38 | static int decode(unsigned char const *, unsigned long); 39 | 40 | int main(int argc, char *argv[]) 41 | { 42 | struct stat stat; 43 | void *fdm; 44 | 45 | if (argc != 1) 46 | return 1; 47 | 48 | if (fstat(STDIN_FILENO, &stat) == -1 || 49 | stat.st_size == 0) 50 | return 2; 51 | 52 | fdm = mmap(0, stat.st_size, PROT_READ, MAP_SHARED, STDIN_FILENO, 0); 53 | if (fdm == MAP_FAILED) 54 | return 3; 55 | 56 | decode(fdm, stat.st_size); 57 | 58 | if (munmap(fdm, stat.st_size) == -1) 59 | return 4; 60 | 61 | return 0; 62 | } 63 | 64 | /* 65 | * This is a private message structure. A generic pointer to this structure 66 | * is passed to each of the callback functions. Put here any data you need 67 | * to access from within the callbacks. 68 | */ 69 | 70 | struct buffer { 71 | unsigned char const *start; 72 | unsigned long length; 73 | }; 74 | 75 | /* 76 | * This is the input callback. The purpose of this callback is to (re)fill 77 | * the stream buffer which is to be decoded. In this example, an entire file 78 | * has been mapped into memory, so we just call mad_stream_buffer() with the 79 | * address and length of the mapping. When this callback is called a second 80 | * time, we are finished decoding. 81 | */ 82 | 83 | static 84 | enum mad_flow input(void *data, 85 | struct mad_stream *stream) 86 | { 87 | struct buffer *buffer = data; 88 | 89 | if (!buffer->length) 90 | return MAD_FLOW_STOP; 91 | 92 | mad_stream_buffer(stream, buffer->start, buffer->length); 93 | 94 | buffer->length = 0; 95 | 96 | return MAD_FLOW_CONTINUE; 97 | } 98 | 99 | /* 100 | * The following utility routine performs simple rounding, clipping, and 101 | * scaling of MAD's high-resolution samples down to 16 bits. It does not 102 | * perform any dithering or noise shaping, which would be recommended to 103 | * obtain any exceptional audio quality. It is therefore not recommended to 104 | * use this routine if high-quality output is desired. 105 | */ 106 | 107 | static inline 108 | signed int scale(mad_fixed_t sample) 109 | { 110 | /* round */ 111 | sample += (1L << (MAD_F_FRACBITS - 16)); 112 | 113 | /* clip */ 114 | if (sample >= MAD_F_ONE) 115 | sample = MAD_F_ONE - 1; 116 | else if (sample < -MAD_F_ONE) 117 | sample = -MAD_F_ONE; 118 | 119 | /* quantize */ 120 | return sample >> (MAD_F_FRACBITS + 1 - 16); 121 | } 122 | 123 | /* 124 | * This is the output callback function. It is called after each frame of 125 | * MPEG audio data has been completely decoded. The purpose of this callback 126 | * is to output (or play) the decoded PCM audio. 127 | */ 128 | 129 | static 130 | enum mad_flow output(void *data, 131 | struct mad_header const *header, 132 | struct mad_pcm *pcm) 133 | { 134 | unsigned int nchannels, nsamples; 135 | mad_fixed_t const *left_ch, *right_ch; 136 | 137 | /* pcm->samplerate contains the sampling frequency */ 138 | 139 | nchannels = pcm->channels; 140 | nsamples = pcm->length; 141 | left_ch = pcm->samples[0]; 142 | right_ch = pcm->samples[1]; 143 | 144 | while (nsamples--) { 145 | signed int sample; 146 | 147 | /* output sample(s) in 16-bit signed little-endian PCM */ 148 | 149 | sample = scale(*left_ch++); 150 | putchar((sample >> 0) & 0xff); 151 | putchar((sample >> 8) & 0xff); 152 | 153 | if (nchannels == 2) { 154 | sample = scale(*right_ch++); 155 | putchar((sample >> 0) & 0xff); 156 | putchar((sample >> 8) & 0xff); 157 | } 158 | } 159 | 160 | return MAD_FLOW_CONTINUE; 161 | } 162 | 163 | /* 164 | * This is the error callback function. It is called whenever a decoding 165 | * error occurs. The error is indicated by stream->error; the list of 166 | * possible MAD_ERROR_* errors can be found in the mad.h (or stream.h) 167 | * header file. 168 | */ 169 | 170 | static 171 | enum mad_flow error(void *data, 172 | struct mad_stream *stream, 173 | struct mad_frame *frame) 174 | { 175 | struct buffer *buffer = data; 176 | 177 | fprintf(stderr, "decoding error 0x%04x (%s) at byte offset %u\n", 178 | stream->error, mad_stream_errorstr(stream), 179 | stream->this_frame - buffer->start); 180 | 181 | /* return MAD_FLOW_BREAK here to stop decoding (and propagate an error) */ 182 | 183 | return MAD_FLOW_CONTINUE; 184 | } 185 | 186 | /* 187 | * This is the function called by main() above to perform all the decoding. 188 | * It instantiates a decoder object and configures it with the input, 189 | * output, and error callback functions above. A single call to 190 | * mad_decoder_run() continues until a callback function returns 191 | * MAD_FLOW_STOP (to stop decoding) or MAD_FLOW_BREAK (to stop decoding and 192 | * signal an error). 193 | */ 194 | 195 | static 196 | int decode(unsigned char const *start, unsigned long length) 197 | { 198 | struct buffer buffer; 199 | struct mad_decoder decoder; 200 | int result; 201 | 202 | /* initialize our private message structure */ 203 | 204 | buffer.start = start; 205 | buffer.length = length; 206 | 207 | /* configure input, output, and error functions */ 208 | 209 | mad_decoder_init(&decoder, &buffer, 210 | input, 0 /* header */, 0 /* filter */, output, 211 | error, 0 /* message */); 212 | 213 | /* start decoding */ 214 | 215 | result = mad_decoder_run(&decoder, MAD_DECODER_MODE_SYNC); 216 | 217 | /* release the decoder */ 218 | 219 | mad_decoder_finish(&decoder); 220 | 221 | return result; 222 | } 223 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | errstatus=0 8 | dirmode="" 9 | 10 | usage="\ 11 | Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." 12 | 13 | # process command line arguments 14 | while test $# -gt 0 ; do 15 | case $1 in 16 | -h | --help | --h*) # -h for help 17 | echo "$usage" 1>&2 18 | exit 0 19 | ;; 20 | -m) # -m PERM arg 21 | shift 22 | test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } 23 | dirmode=$1 24 | shift 25 | ;; 26 | --) # stop option processing 27 | shift 28 | break 29 | ;; 30 | -*) # unknown option 31 | echo "$usage" 1>&2 32 | exit 1 33 | ;; 34 | *) # first non-opt arg 35 | break 36 | ;; 37 | esac 38 | done 39 | 40 | for file 41 | do 42 | if test -d "$file"; then 43 | shift 44 | else 45 | break 46 | fi 47 | done 48 | 49 | case $# in 50 | 0) exit 0 ;; 51 | esac 52 | 53 | case $dirmode in 54 | '') 55 | if mkdir -p -- . 2>/dev/null; then 56 | echo "mkdir -p -- $*" 57 | exec mkdir -p -- "$@" 58 | fi 59 | ;; 60 | *) 61 | if mkdir -m "$dirmode" -p -- . 2>/dev/null; then 62 | echo "mkdir -m $dirmode -p -- $*" 63 | exec mkdir -m "$dirmode" -p -- "$@" 64 | fi 65 | ;; 66 | esac 67 | 68 | for file 69 | do 70 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 71 | shift 72 | 73 | pathcomp= 74 | for d 75 | do 76 | pathcomp="$pathcomp$d" 77 | case $pathcomp in 78 | -*) pathcomp=./$pathcomp ;; 79 | esac 80 | 81 | if test ! -d "$pathcomp"; then 82 | echo "mkdir $pathcomp" 83 | 84 | mkdir "$pathcomp" || lasterr=$? 85 | 86 | if test ! -d "$pathcomp"; then 87 | errstatus=$lasterr 88 | else 89 | if test ! -z "$dirmode"; then 90 | echo "chmod $dirmode $pathcomp" 91 | lasterr="" 92 | chmod "$dirmode" "$pathcomp" || lasterr=$? 93 | 94 | if test ! -z "$lasterr"; then 95 | errstatus=$lasterr 96 | fi 97 | fi 98 | fi 99 | fi 100 | 101 | pathcomp="$pathcomp/" 102 | done 103 | done 104 | 105 | exit $errstatus 106 | 107 | # Local Variables: 108 | # mode: shell-script 109 | # sh-indentation: 2 110 | # End: 111 | # mkinstalldirs ends here 112 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/msvc++/Makefile.am: -------------------------------------------------------------------------------- 1 | ## 2 | ## libmad - MPEG audio decoder library 3 | ## Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | ## 5 | ## This program is free software; you can redistribute it and/or modify 6 | ## it under the terms of the GNU General Public License as published by 7 | ## the Free Software Foundation; either version 2 of the License, or 8 | ## (at your option) any later version. 9 | ## 10 | ## This program is distributed in the hope that it will be useful, 11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ## GNU General Public License for more details. 14 | ## 15 | ## You should have received a copy of the GNU General Public License 16 | ## along with this program; if not, write to the Free Software 17 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | ## 19 | ## $Id: Makefile.am,v 1.3 2004/01/23 09:41:33 rob Exp $ 20 | ## 21 | 22 | ## Process this file with automake to produce Makefile.in 23 | 24 | EXTRA_DIST = mad.h config.h libmad.dsp 25 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/msvc++/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated by configure. */ 2 | /* config.h.in. Generated from configure.ac by autoheader. */ 3 | 4 | /* Define to enable diagnostic debugging support. */ 5 | /* #undef DEBUG */ 6 | 7 | /* Define to enable experimental code. */ 8 | /* #undef EXPERIMENTAL */ 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_ASSERT_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | /* #undef HAVE_DLFCN_H */ 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_ERRNO_H 1 18 | 19 | /* Define to 1 if you have the `fcntl' function. */ 20 | /* #undef HAVE_FCNTL */ 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_FCNTL_H 1 24 | 25 | /* Define to 1 if you have the `fork' function. */ 26 | /* #undef HAVE_FORK */ 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_INTTYPES_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_LIMITS_H 1 33 | 34 | /* Define if your MIPS CPU supports a 2-operand MADD16 instruction. */ 35 | /* #undef HAVE_MADD16_ASM */ 36 | 37 | /* Define if your MIPS CPU supports a 2-operand MADD instruction. */ 38 | /* #undef HAVE_MADD_ASM */ 39 | 40 | /* Define to 1 if you have the header file. */ 41 | #define HAVE_MEMORY_H 1 42 | 43 | /* Define to 1 if you have the `pipe' function. */ 44 | /* #undef HAVE_PIPE */ 45 | 46 | /* Define to 1 if you have the header file. */ 47 | #define HAVE_STDINT_H 1 48 | 49 | /* Define to 1 if you have the header file. */ 50 | #define HAVE_STDLIB_H 1 51 | 52 | /* Define to 1 if you have the header file. */ 53 | #define HAVE_STRINGS_H 1 54 | 55 | /* Define to 1 if you have the header file. */ 56 | #define HAVE_STRING_H 1 57 | 58 | /* Define to 1 if you have the header file. */ 59 | #define HAVE_SYS_STAT_H 1 60 | 61 | /* Define to 1 if you have the header file. */ 62 | #define HAVE_SYS_TYPES_H 1 63 | 64 | /* Define to 1 if you have that is POSIX.1 compatible. */ 65 | /* #undef HAVE_SYS_WAIT_H */ 66 | 67 | /* Define to 1 if you have the header file. */ 68 | /* #undef HAVE_UNISTD_H */ 69 | 70 | /* Define to 1 if you have the `waitpid' function. */ 71 | /* #undef HAVE_WAITPID */ 72 | 73 | /* Define to disable debugging assertions. */ 74 | /* #undef NDEBUG */ 75 | 76 | /* Define to optimize for accuracy over speed. */ 77 | /* #undef OPT_ACCURACY */ 78 | 79 | /* Define to optimize for speed over accuracy. */ 80 | /* #undef OPT_SPEED */ 81 | 82 | /* Define to enable a fast subband synthesis approximation optimization. */ 83 | /* #undef OPT_SSO */ 84 | 85 | /* Define to influence a strict interpretation of the ISO/IEC standards, even 86 | if this is in opposition with best accepted practices. */ 87 | /* #undef OPT_STRICT */ 88 | 89 | /* Name of package */ 90 | #define PACKAGE "libmad" 91 | 92 | /* Define to the address where bug reports for this package should be sent. */ 93 | #define PACKAGE_BUGREPORT "support@underbit.com" 94 | 95 | /* Define to the full name of this package. */ 96 | #define PACKAGE_NAME "MPEG Audio Decoder" 97 | 98 | /* Define to the full name and version of this package. */ 99 | #define PACKAGE_STRING "MPEG Audio Decoder 0.15.1b" 100 | 101 | /* Define to the one symbol short name of this package. */ 102 | #define PACKAGE_TARNAME "libmad" 103 | 104 | /* Define to the version of this package. */ 105 | #define PACKAGE_VERSION "0.15.1b" 106 | 107 | /* The size of a `int', as computed by sizeof. */ 108 | #define SIZEOF_INT 4 109 | 110 | /* The size of a `long', as computed by sizeof. */ 111 | #define SIZEOF_LONG 4 112 | 113 | /* The size of a `long long', as computed by sizeof. */ 114 | #define SIZEOF_LONG_LONG 8 115 | 116 | /* Define to 1 if you have the ANSI C header files. */ 117 | #define STDC_HEADERS 1 118 | 119 | /* Version number of package */ 120 | #define VERSION "0.15.1b" 121 | 122 | /* Define to empty if `const' does not conform to ANSI C. */ 123 | /* #undef const */ 124 | 125 | /* Define as `__inline' if that's what the C compiler calls it, or to nothing 126 | if it is not supported. */ 127 | #define inline __inline 128 | 129 | /* Define to `int' if does not define. */ 130 | /* #undef pid_t */ 131 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/msvc++/libmad.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="libmad" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Static Library" 0x0104 6 | 7 | CFG=libmad - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "libmad.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "libmad.mak" CFG="libmad - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "libmad - Win32 Release" (based on "Win32 (x86) Static Library") 21 | !MESSAGE "libmad - Win32 Debug" (based on "Win32 (x86) Static Library") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "libmad - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "Release" 36 | # PROP BASE Intermediate_Dir "Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "Release" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Target_Dir "" 43 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c 44 | # ADD CPP /nologo /GX /O2 /I "." /D "NDEBUG" /D "FPM_INTEL" /D "WIN32" /D "_MBCS" /D "_LIB" /D "HAVE_CONFIG_H" /D "ASO_ZEROCHECK" /FD /c 45 | # SUBTRACT CPP /YX 46 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 47 | # ADD RSC /l 0x409 /d "NDEBUG" 48 | BSC32=bscmake.exe 49 | # ADD BASE BSC32 /nologo 50 | # ADD BSC32 /nologo 51 | LIB32=link.exe -lib 52 | # ADD BASE LIB32 /nologo 53 | # ADD LIB32 /nologo 54 | 55 | !ELSEIF "$(CFG)" == "libmad - Win32 Debug" 56 | 57 | # PROP BASE Use_MFC 0 58 | # PROP BASE Use_Debug_Libraries 1 59 | # PROP BASE Output_Dir "Debug" 60 | # PROP BASE Intermediate_Dir "Debug" 61 | # PROP BASE Target_Dir "" 62 | # PROP Use_MFC 0 63 | # PROP Use_Debug_Libraries 1 64 | # PROP Output_Dir "Debug" 65 | # PROP Intermediate_Dir "Debug" 66 | # PROP Target_Dir "" 67 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c 68 | # ADD CPP /nologo /Gm /GX /ZI /Od /I "." /D "FPM_DEFAULT" /D "_LIB" /D "HAVE_CONFIG_H" /D "ASO_ZEROCHECK" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "DEBUG" /FD /GZ /c 69 | # SUBTRACT CPP /YX 70 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 71 | # ADD RSC /l 0x409 /d "_DEBUG" 72 | BSC32=bscmake.exe 73 | # ADD BASE BSC32 /nologo 74 | # ADD BSC32 /nologo 75 | LIB32=link.exe -lib 76 | # ADD BASE LIB32 /nologo 77 | # ADD LIB32 /nologo 78 | 79 | !ENDIF 80 | 81 | # Begin Target 82 | 83 | # Name "libmad - Win32 Release" 84 | # Name "libmad - Win32 Debug" 85 | # Begin Group "Source Files" 86 | 87 | # PROP Default_Filter "c" 88 | # Begin Source File 89 | 90 | SOURCE=..\bit.c 91 | # End Source File 92 | # Begin Source File 93 | 94 | SOURCE=..\decoder.c 95 | # End Source File 96 | # Begin Source File 97 | 98 | SOURCE=..\fixed.c 99 | # End Source File 100 | # Begin Source File 101 | 102 | SOURCE=..\frame.c 103 | # End Source File 104 | # Begin Source File 105 | 106 | SOURCE=..\huffman.c 107 | # End Source File 108 | # Begin Source File 109 | 110 | SOURCE=..\layer12.c 111 | # End Source File 112 | # Begin Source File 113 | 114 | SOURCE=..\layer3.c 115 | # End Source File 116 | # Begin Source File 117 | 118 | SOURCE=..\stream.c 119 | # End Source File 120 | # Begin Source File 121 | 122 | SOURCE=..\synth.c 123 | # End Source File 124 | # Begin Source File 125 | 126 | SOURCE=..\timer.c 127 | # End Source File 128 | # Begin Source File 129 | 130 | SOURCE=..\version.c 131 | # End Source File 132 | # End Group 133 | # Begin Group "Header Files" 134 | 135 | # PROP Default_Filter "h" 136 | # Begin Source File 137 | 138 | SOURCE=..\bit.h 139 | # End Source File 140 | # Begin Source File 141 | 142 | SOURCE=.\config.h 143 | # End Source File 144 | # Begin Source File 145 | 146 | SOURCE=..\decoder.h 147 | # End Source File 148 | # Begin Source File 149 | 150 | SOURCE=..\fixed.h 151 | # End Source File 152 | # Begin Source File 153 | 154 | SOURCE=..\frame.h 155 | # End Source File 156 | # Begin Source File 157 | 158 | SOURCE=..\global.h 159 | # End Source File 160 | # Begin Source File 161 | 162 | SOURCE=..\huffman.h 163 | # End Source File 164 | # Begin Source File 165 | 166 | SOURCE=..\layer12.h 167 | # End Source File 168 | # Begin Source File 169 | 170 | SOURCE=..\layer3.h 171 | # End Source File 172 | # Begin Source File 173 | 174 | SOURCE=..\stream.h 175 | # End Source File 176 | # Begin Source File 177 | 178 | SOURCE=..\synth.h 179 | # End Source File 180 | # Begin Source File 181 | 182 | SOURCE=..\timer.h 183 | # End Source File 184 | # Begin Source File 185 | 186 | SOURCE=..\version.h 187 | # End Source File 188 | # End Group 189 | # Begin Group "Data Files" 190 | 191 | # PROP Default_Filter "dat" 192 | # Begin Source File 193 | 194 | SOURCE=..\D.dat 195 | # End Source File 196 | # Begin Source File 197 | 198 | SOURCE=..\imdct_s.dat 199 | # End Source File 200 | # Begin Source File 201 | 202 | SOURCE=..\qc_table.dat 203 | # End Source File 204 | # Begin Source File 205 | 206 | SOURCE=..\rq_table.dat 207 | # End Source File 208 | # Begin Source File 209 | 210 | SOURCE=..\sf_table.dat 211 | # End Source File 212 | # End Group 213 | # End Target 214 | # End Project 215 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/qc_table.dat: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: qc_table.dat,v 1.7 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | /* 23 | * These are the Layer II classes of quantization. 24 | * The table is derived from Table B.4 of ISO/IEC 11172-3. 25 | */ 26 | 27 | { 3, 2, 5, 28 | MAD_F(0x15555555) /* 1.33333333333 => 1.33333333209, e 0.00000000124 */, 29 | MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e 0.00000000000 */ }, 30 | { 5, 3, 7, 31 | MAD_F(0x1999999a) /* 1.60000000000 => 1.60000000149, e -0.00000000149 */, 32 | MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e 0.00000000000 */ }, 33 | { 7, 0, 3, 34 | MAD_F(0x12492492) /* 1.14285714286 => 1.14285714179, e 0.00000000107 */, 35 | MAD_F(0x04000000) /* 0.25000000000 => 0.25000000000, e 0.00000000000 */ }, 36 | { 9, 4, 10, 37 | MAD_F(0x1c71c71c) /* 1.77777777777 => 1.77777777612, e 0.00000000165 */, 38 | MAD_F(0x08000000) /* 0.50000000000 => 0.50000000000, e 0.00000000000 */ }, 39 | { 15, 0, 4, 40 | MAD_F(0x11111111) /* 1.06666666666 => 1.06666666642, e 0.00000000024 */, 41 | MAD_F(0x02000000) /* 0.12500000000 => 0.12500000000, e 0.00000000000 */ }, 42 | { 31, 0, 5, 43 | MAD_F(0x10842108) /* 1.03225806452 => 1.03225806355, e 0.00000000097 */, 44 | MAD_F(0x01000000) /* 0.06250000000 => 0.06250000000, e 0.00000000000 */ }, 45 | { 63, 0, 6, 46 | MAD_F(0x10410410) /* 1.01587301587 => 1.01587301493, e 0.00000000094 */, 47 | MAD_F(0x00800000) /* 0.03125000000 => 0.03125000000, e 0.00000000000 */ }, 48 | { 127, 0, 7, 49 | MAD_F(0x10204081) /* 1.00787401575 => 1.00787401572, e 0.00000000003 */, 50 | MAD_F(0x00400000) /* 0.01562500000 => 0.01562500000, e 0.00000000000 */ }, 51 | { 255, 0, 8, 52 | MAD_F(0x10101010) /* 1.00392156863 => 1.00392156839, e 0.00000000024 */, 53 | MAD_F(0x00200000) /* 0.00781250000 => 0.00781250000, e 0.00000000000 */ }, 54 | { 511, 0, 9, 55 | MAD_F(0x10080402) /* 1.00195694716 => 1.00195694715, e 0.00000000001 */, 56 | MAD_F(0x00100000) /* 0.00390625000 => 0.00390625000, e 0.00000000000 */ }, 57 | { 1023, 0, 10, 58 | MAD_F(0x10040100) /* 1.00097751711 => 1.00097751617, e 0.00000000094 */, 59 | MAD_F(0x00080000) /* 0.00195312500 => 0.00195312500, e 0.00000000000 */ }, 60 | { 2047, 0, 11, 61 | MAD_F(0x10020040) /* 1.00048851979 => 1.00048851967, e 0.00000000012 */, 62 | MAD_F(0x00040000) /* 0.00097656250 => 0.00097656250, e 0.00000000000 */ }, 63 | { 4095, 0, 12, 64 | MAD_F(0x10010010) /* 1.00024420024 => 1.00024420023, e 0.00000000001 */, 65 | MAD_F(0x00020000) /* 0.00048828125 => 0.00048828125, e 0.00000000000 */ }, 66 | { 8191, 0, 13, 67 | MAD_F(0x10008004) /* 1.00012208522 => 1.00012208521, e 0.00000000001 */, 68 | MAD_F(0x00010000) /* 0.00024414063 => 0.00024414062, e 0.00000000000 */ }, 69 | { 16383, 0, 14, 70 | MAD_F(0x10004001) /* 1.00006103888 => 1.00006103888, e -0.00000000000 */, 71 | MAD_F(0x00008000) /* 0.00012207031 => 0.00012207031, e -0.00000000000 */ }, 72 | { 32767, 0, 15, 73 | MAD_F(0x10002000) /* 1.00003051851 => 1.00003051758, e 0.00000000093 */, 74 | MAD_F(0x00004000) /* 0.00006103516 => 0.00006103516, e 0.00000000000 */ }, 75 | { 65535, 0, 16, 76 | MAD_F(0x10001000) /* 1.00001525902 => 1.00001525879, e 0.00000000023 */, 77 | MAD_F(0x00002000) /* 0.00003051758 => 0.00003051758, e 0.00000000000 */ } 78 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/sf_table.dat: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: sf_table.dat,v 1.7 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | /* 23 | * These are the scalefactor values for Layer I and Layer II. 24 | * The values are from Table B.1 of ISO/IEC 11172-3. 25 | * 26 | * There is some error introduced by the 32-bit fixed-point representation; 27 | * the amount of error is shown. For 16-bit PCM output, this shouldn't be 28 | * too much of a problem. 29 | * 30 | * Strictly speaking, Table B.1 has only 63 entries (0-62), thus a strict 31 | * interpretation of ISO/IEC 11172-3 would suggest that a scalefactor index of 32 | * 63 is invalid. However, for better compatibility with current practices, we 33 | * add a 64th entry. 34 | */ 35 | 36 | MAD_F(0x20000000), /* 2.000000000000 => 2.000000000000, e 0.000000000000 */ 37 | MAD_F(0x1965fea5), /* 1.587401051968 => 1.587401051074, e 0.000000000894 */ 38 | MAD_F(0x1428a2fa), /* 1.259921049895 => 1.259921051562, e -0.000000001667 */ 39 | MAD_F(0x10000000), /* 1.000000000000 => 1.000000000000, e 0.000000000000 */ 40 | MAD_F(0x0cb2ff53), /* 0.793700525984 => 0.793700527400, e -0.000000001416 */ 41 | MAD_F(0x0a14517d), /* 0.629960524947 => 0.629960525781, e -0.000000000833 */ 42 | MAD_F(0x08000000), /* 0.500000000000 => 0.500000000000, e 0.000000000000 */ 43 | MAD_F(0x06597fa9), /* 0.396850262992 => 0.396850261837, e 0.000000001155 */ 44 | 45 | MAD_F(0x050a28be), /* 0.314980262474 => 0.314980261028, e 0.000000001446 */ 46 | MAD_F(0x04000000), /* 0.250000000000 => 0.250000000000, e 0.000000000000 */ 47 | MAD_F(0x032cbfd5), /* 0.198425131496 => 0.198425132781, e -0.000000001285 */ 48 | MAD_F(0x0285145f), /* 0.157490131237 => 0.157490130514, e 0.000000000723 */ 49 | MAD_F(0x02000000), /* 0.125000000000 => 0.125000000000, e 0.000000000000 */ 50 | MAD_F(0x01965fea), /* 0.099212565748 => 0.099212564528, e 0.000000001220 */ 51 | MAD_F(0x01428a30), /* 0.078745065618 => 0.078745067120, e -0.000000001501 */ 52 | MAD_F(0x01000000), /* 0.062500000000 => 0.062500000000, e 0.000000000000 */ 53 | 54 | MAD_F(0x00cb2ff5), /* 0.049606282874 => 0.049606282264, e 0.000000000610 */ 55 | MAD_F(0x00a14518), /* 0.039372532809 => 0.039372533560, e -0.000000000751 */ 56 | MAD_F(0x00800000), /* 0.031250000000 => 0.031250000000, e 0.000000000000 */ 57 | MAD_F(0x006597fb), /* 0.024803141437 => 0.024803142995, e -0.000000001558 */ 58 | MAD_F(0x0050a28c), /* 0.019686266405 => 0.019686266780, e -0.000000000375 */ 59 | MAD_F(0x00400000), /* 0.015625000000 => 0.015625000000, e 0.000000000000 */ 60 | MAD_F(0x0032cbfd), /* 0.012401570719 => 0.012401569635, e 0.000000001084 */ 61 | MAD_F(0x00285146), /* 0.009843133202 => 0.009843133390, e -0.000000000188 */ 62 | 63 | MAD_F(0x00200000), /* 0.007812500000 => 0.007812500000, e 0.000000000000 */ 64 | MAD_F(0x001965ff), /* 0.006200785359 => 0.006200786680, e -0.000000001321 */ 65 | MAD_F(0x001428a3), /* 0.004921566601 => 0.004921566695, e -0.000000000094 */ 66 | MAD_F(0x00100000), /* 0.003906250000 => 0.003906250000, e 0.000000000000 */ 67 | MAD_F(0x000cb2ff), /* 0.003100392680 => 0.003100391477, e 0.000000001202 */ 68 | MAD_F(0x000a1451), /* 0.002460783301 => 0.002460781485, e 0.000000001816 */ 69 | MAD_F(0x00080000), /* 0.001953125000 => 0.001953125000, e 0.000000000000 */ 70 | MAD_F(0x00065980), /* 0.001550196340 => 0.001550197601, e -0.000000001262 */ 71 | 72 | MAD_F(0x00050a29), /* 0.001230391650 => 0.001230392605, e -0.000000000955 */ 73 | MAD_F(0x00040000), /* 0.000976562500 => 0.000976562500, e 0.000000000000 */ 74 | MAD_F(0x00032cc0), /* 0.000775098170 => 0.000775098801, e -0.000000000631 */ 75 | MAD_F(0x00028514), /* 0.000615195825 => 0.000615194440, e 0.000000001385 */ 76 | MAD_F(0x00020000), /* 0.000488281250 => 0.000488281250, e 0.000000000000 */ 77 | MAD_F(0x00019660), /* 0.000387549085 => 0.000387549400, e -0.000000000315 */ 78 | MAD_F(0x0001428a), /* 0.000307597913 => 0.000307597220, e 0.000000000693 */ 79 | MAD_F(0x00010000), /* 0.000244140625 => 0.000244140625, e 0.000000000000 */ 80 | 81 | MAD_F(0x0000cb30), /* 0.000193774542 => 0.000193774700, e -0.000000000158 */ 82 | MAD_F(0x0000a145), /* 0.000153798956 => 0.000153798610, e 0.000000000346 */ 83 | MAD_F(0x00008000), /* 0.000122070313 => 0.000122070313, e 0.000000000000 */ 84 | MAD_F(0x00006598), /* 0.000096887271 => 0.000096887350, e -0.000000000079 */ 85 | MAD_F(0x000050a3), /* 0.000076899478 => 0.000076901168, e -0.000000001689 */ 86 | MAD_F(0x00004000), /* 0.000061035156 => 0.000061035156, e 0.000000000000 */ 87 | MAD_F(0x000032cc), /* 0.000048443636 => 0.000048443675, e -0.000000000039 */ 88 | MAD_F(0x00002851), /* 0.000038449739 => 0.000038448721, e 0.000000001018 */ 89 | 90 | MAD_F(0x00002000), /* 0.000030517578 => 0.000030517578, e 0.000000000000 */ 91 | MAD_F(0x00001966), /* 0.000024221818 => 0.000024221838, e -0.000000000020 */ 92 | MAD_F(0x00001429), /* 0.000019224870 => 0.000019226223, e -0.000000001354 */ 93 | MAD_F(0x00001000), /* 0.000015258789 => 0.000015258789, e -0.000000000000 */ 94 | MAD_F(0x00000cb3), /* 0.000012110909 => 0.000012110919, e -0.000000000010 */ 95 | MAD_F(0x00000a14), /* 0.000009612435 => 0.000009611249, e 0.000000001186 */ 96 | MAD_F(0x00000800), /* 0.000007629395 => 0.000007629395, e -0.000000000000 */ 97 | MAD_F(0x00000659), /* 0.000006055454 => 0.000006053597, e 0.000000001858 */ 98 | 99 | MAD_F(0x0000050a), /* 0.000004806217 => 0.000004805624, e 0.000000000593 */ 100 | MAD_F(0x00000400), /* 0.000003814697 => 0.000003814697, e 0.000000000000 */ 101 | MAD_F(0x0000032d), /* 0.000003027727 => 0.000003028661, e -0.000000000934 */ 102 | MAD_F(0x00000285), /* 0.000002403109 => 0.000002402812, e 0.000000000296 */ 103 | MAD_F(0x00000200), /* 0.000001907349 => 0.000001907349, e -0.000000000000 */ 104 | MAD_F(0x00000196), /* 0.000001513864 => 0.000001512468, e 0.000000001396 */ 105 | MAD_F(0x00000143), /* 0.000001201554 => 0.000001203269, e -0.000000001714 */ 106 | MAD_F(0x00000000) /* this compatibility entry is not part of Table B.1 */ 107 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for config.h 2 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/stream.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: stream.c,v 1.12 2004/02/05 09:02:39 rob Exp $ 20 | */ 21 | 22 | # ifdef HAVE_CONFIG_H 23 | # include "config.h" 24 | # endif 25 | 26 | # include "global.h" 27 | 28 | # include 29 | 30 | # include "bit.h" 31 | # include "stream.h" 32 | 33 | /* 34 | * NAME: stream->init() 35 | * DESCRIPTION: initialize stream struct 36 | */ 37 | void mad_stream_init(struct mad_stream *stream) 38 | { 39 | stream->buffer = 0; 40 | stream->bufend = 0; 41 | stream->skiplen = 0; 42 | 43 | stream->sync = 0; 44 | stream->freerate = 0; 45 | 46 | stream->this_frame = 0; 47 | stream->next_frame = 0; 48 | mad_bit_init(&stream->ptr, 0); 49 | 50 | mad_bit_init(&stream->anc_ptr, 0); 51 | stream->anc_bitlen = 0; 52 | 53 | stream->main_data = 0; 54 | stream->md_len = 0; 55 | 56 | stream->options = 0; 57 | stream->error = MAD_ERROR_NONE; 58 | } 59 | 60 | /* 61 | * NAME: stream->finish() 62 | * DESCRIPTION: deallocate any dynamic memory associated with stream 63 | */ 64 | void mad_stream_finish(struct mad_stream *stream) 65 | { 66 | if (stream->main_data) { 67 | free(stream->main_data); 68 | stream->main_data = 0; 69 | } 70 | 71 | mad_bit_finish(&stream->anc_ptr); 72 | mad_bit_finish(&stream->ptr); 73 | } 74 | 75 | /* 76 | * NAME: stream->buffer() 77 | * DESCRIPTION: set stream buffer pointers 78 | */ 79 | void mad_stream_buffer(struct mad_stream *stream, 80 | unsigned char const *buffer, unsigned long length) 81 | { 82 | stream->buffer = buffer; 83 | stream->bufend = buffer + length; 84 | 85 | stream->this_frame = buffer; 86 | stream->next_frame = buffer; 87 | 88 | stream->sync = 1; 89 | 90 | mad_bit_init(&stream->ptr, buffer); 91 | } 92 | 93 | /* 94 | * NAME: stream->skip() 95 | * DESCRIPTION: arrange to skip bytes before the next frame 96 | */ 97 | void mad_stream_skip(struct mad_stream *stream, unsigned long length) 98 | { 99 | stream->skiplen += length; 100 | } 101 | 102 | /* 103 | * NAME: stream->sync() 104 | * DESCRIPTION: locate the next stream sync word 105 | */ 106 | int mad_stream_sync(struct mad_stream *stream) 107 | { 108 | register unsigned char const *ptr, *end; 109 | 110 | ptr = mad_bit_nextbyte(&stream->ptr); 111 | end = stream->bufend; 112 | 113 | while (ptr < end - 1 && 114 | !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) 115 | ++ptr; 116 | 117 | if (end - ptr < MAD_BUFFER_GUARD) 118 | return -1; 119 | 120 | mad_bit_init(&stream->ptr, ptr); 121 | 122 | return 0; 123 | } 124 | 125 | /* 126 | * NAME: stream->errorstr() 127 | * DESCRIPTION: return a string description of the current error condition 128 | */ 129 | char const *mad_stream_errorstr(struct mad_stream const *stream) 130 | { 131 | switch (stream->error) { 132 | case MAD_ERROR_NONE: return "no error"; 133 | 134 | case MAD_ERROR_BUFLEN: return "input buffer too small (or EOF)"; 135 | case MAD_ERROR_BUFPTR: return "invalid (null) buffer pointer"; 136 | 137 | case MAD_ERROR_NOMEM: return "not enough memory"; 138 | 139 | case MAD_ERROR_LOSTSYNC: return "lost synchronization"; 140 | case MAD_ERROR_BADLAYER: return "reserved header layer value"; 141 | case MAD_ERROR_BADBITRATE: return "forbidden bitrate value"; 142 | case MAD_ERROR_BADSAMPLERATE: return "reserved sample frequency value"; 143 | case MAD_ERROR_BADEMPHASIS: return "reserved emphasis value"; 144 | 145 | case MAD_ERROR_BADCRC: return "CRC check failed"; 146 | case MAD_ERROR_BADBITALLOC: return "forbidden bit allocation value"; 147 | case MAD_ERROR_BADSCALEFACTOR: return "bad scalefactor index"; 148 | case MAD_ERROR_BADMODE: return "bad bitrate/mode combination"; 149 | case MAD_ERROR_BADFRAMELEN: return "bad frame length"; 150 | case MAD_ERROR_BADBIGVALUES: return "bad big_values count"; 151 | case MAD_ERROR_BADBLOCKTYPE: return "reserved block_type"; 152 | case MAD_ERROR_BADSCFSI: return "bad scalefactor selection info"; 153 | case MAD_ERROR_BADDATAPTR: return "bad main_data_begin pointer"; 154 | case MAD_ERROR_BADPART3LEN: return "bad audio data length"; 155 | case MAD_ERROR_BADHUFFTABLE: return "bad Huffman table select"; 156 | case MAD_ERROR_BADHUFFDATA: return "Huffman data overrun"; 157 | case MAD_ERROR_BADSTEREO: return "incompatible block_type for JS"; 158 | } 159 | 160 | return 0; 161 | } 162 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/stream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_STREAM_H 23 | # define LIBMAD_STREAM_H 24 | 25 | # include "bit.h" 26 | 27 | # define MAD_BUFFER_GUARD 8 28 | # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) 29 | 30 | enum mad_error { 31 | MAD_ERROR_NONE = 0x0000, /* no error */ 32 | 33 | MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ 34 | MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ 35 | 36 | MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ 37 | 38 | MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ 39 | MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ 40 | MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ 41 | MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ 42 | MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ 43 | 44 | MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ 45 | MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ 46 | MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ 47 | MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */ 48 | MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ 49 | MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ 50 | MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ 51 | MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ 52 | MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ 53 | MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ 54 | MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ 55 | MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ 56 | MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ 57 | }; 58 | 59 | # define MAD_RECOVERABLE(error) ((error) & 0xff00) 60 | 61 | struct mad_stream { 62 | unsigned char const *buffer; /* input bitstream buffer */ 63 | unsigned char const *bufend; /* end of buffer */ 64 | unsigned long skiplen; /* bytes to skip before next frame */ 65 | 66 | int sync; /* stream sync found */ 67 | unsigned long freerate; /* free bitrate (fixed) */ 68 | 69 | unsigned char const *this_frame; /* start of current frame */ 70 | unsigned char const *next_frame; /* start of next frame */ 71 | struct mad_bitptr ptr; /* current processing bit pointer */ 72 | 73 | struct mad_bitptr anc_ptr; /* ancillary bits pointer */ 74 | unsigned int anc_bitlen; /* number of ancillary bits */ 75 | 76 | unsigned char (*main_data)[MAD_BUFFER_MDLEN]; 77 | /* Layer III main_data() */ 78 | unsigned int md_len; /* bytes in main_data */ 79 | 80 | int options; /* decoding options (see below) */ 81 | enum mad_error error; /* error code (see above) */ 82 | }; 83 | 84 | enum { 85 | MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ 86 | MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ 87 | # if 0 /* not yet implemented */ 88 | MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ 89 | MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ 90 | MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ 91 | # endif 92 | }; 93 | 94 | void mad_stream_init(struct mad_stream *); 95 | void mad_stream_finish(struct mad_stream *); 96 | 97 | # define mad_stream_options(stream, opts) \ 98 | ((void) ((stream)->options = (opts))) 99 | 100 | void mad_stream_buffer(struct mad_stream *, 101 | unsigned char const *, unsigned long); 102 | void mad_stream_skip(struct mad_stream *, unsigned long); 103 | 104 | int mad_stream_sync(struct mad_stream *); 105 | 106 | char const *mad_stream_errorstr(struct mad_stream const *); 107 | 108 | # endif 109 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/synth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_SYNTH_H 23 | # define LIBMAD_SYNTH_H 24 | 25 | # include "fixed.h" 26 | # include "frame.h" 27 | 28 | struct mad_pcm { 29 | unsigned int samplerate; /* sampling frequency (Hz) */ 30 | unsigned short channels; /* number of channels */ 31 | unsigned short length; /* number of samples per channel */ 32 | mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ 33 | }; 34 | 35 | struct mad_synth { 36 | mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ 37 | /* [ch][eo][peo][s][v] */ 38 | 39 | unsigned int phase; /* current processing phase */ 40 | 41 | struct mad_pcm pcm; /* PCM output */ 42 | }; 43 | 44 | /* single channel PCM selector */ 45 | enum { 46 | MAD_PCM_CHANNEL_SINGLE = 0 47 | }; 48 | 49 | /* dual channel PCM selector */ 50 | enum { 51 | MAD_PCM_CHANNEL_DUAL_1 = 0, 52 | MAD_PCM_CHANNEL_DUAL_2 = 1 53 | }; 54 | 55 | /* stereo PCM selector */ 56 | enum { 57 | MAD_PCM_CHANNEL_STEREO_LEFT = 0, 58 | MAD_PCM_CHANNEL_STEREO_RIGHT = 1 59 | }; 60 | 61 | void mad_synth_init(struct mad_synth *); 62 | 63 | # define mad_synth_finish(synth) /* nothing */ 64 | 65 | void mad_synth_mute(struct mad_synth *); 66 | 67 | void mad_synth_frame(struct mad_synth *, struct mad_frame const *); 68 | 69 | # endif 70 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_TIMER_H 23 | # define LIBMAD_TIMER_H 24 | 25 | typedef struct { 26 | signed long seconds; /* whole seconds */ 27 | unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ 28 | } mad_timer_t; 29 | 30 | extern mad_timer_t const mad_timer_zero; 31 | 32 | # define MAD_TIMER_RESOLUTION 352800000UL 33 | 34 | enum mad_units { 35 | MAD_UNITS_HOURS = -2, 36 | MAD_UNITS_MINUTES = -1, 37 | MAD_UNITS_SECONDS = 0, 38 | 39 | /* metric units */ 40 | 41 | MAD_UNITS_DECISECONDS = 10, 42 | MAD_UNITS_CENTISECONDS = 100, 43 | MAD_UNITS_MILLISECONDS = 1000, 44 | 45 | /* audio sample units */ 46 | 47 | MAD_UNITS_8000_HZ = 8000, 48 | MAD_UNITS_11025_HZ = 11025, 49 | MAD_UNITS_12000_HZ = 12000, 50 | 51 | MAD_UNITS_16000_HZ = 16000, 52 | MAD_UNITS_22050_HZ = 22050, 53 | MAD_UNITS_24000_HZ = 24000, 54 | 55 | MAD_UNITS_32000_HZ = 32000, 56 | MAD_UNITS_44100_HZ = 44100, 57 | MAD_UNITS_48000_HZ = 48000, 58 | 59 | /* video frame/field units */ 60 | 61 | MAD_UNITS_24_FPS = 24, 62 | MAD_UNITS_25_FPS = 25, 63 | MAD_UNITS_30_FPS = 30, 64 | MAD_UNITS_48_FPS = 48, 65 | MAD_UNITS_50_FPS = 50, 66 | MAD_UNITS_60_FPS = 60, 67 | 68 | /* CD audio frames */ 69 | 70 | MAD_UNITS_75_FPS = 75, 71 | 72 | /* video drop-frame units */ 73 | 74 | MAD_UNITS_23_976_FPS = -24, 75 | MAD_UNITS_24_975_FPS = -25, 76 | MAD_UNITS_29_97_FPS = -30, 77 | MAD_UNITS_47_952_FPS = -48, 78 | MAD_UNITS_49_95_FPS = -50, 79 | MAD_UNITS_59_94_FPS = -60 80 | }; 81 | 82 | # define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) 83 | 84 | int mad_timer_compare(mad_timer_t, mad_timer_t); 85 | 86 | # define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) 87 | 88 | void mad_timer_negate(mad_timer_t *); 89 | mad_timer_t mad_timer_abs(mad_timer_t); 90 | 91 | void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long); 92 | void mad_timer_add(mad_timer_t *, mad_timer_t); 93 | void mad_timer_multiply(mad_timer_t *, signed long); 94 | 95 | signed long mad_timer_count(mad_timer_t, enum mad_units); 96 | unsigned long mad_timer_fraction(mad_timer_t, unsigned long); 97 | void mad_timer_string(mad_timer_t, char *, char const *, 98 | enum mad_units, enum mad_units, unsigned long); 99 | 100 | # endif 101 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: version.c,v 1.15 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifdef HAVE_CONFIG_H 23 | # include "config.h" 24 | # endif 25 | 26 | # include "global.h" 27 | 28 | # include "version.h" 29 | 30 | char const mad_version[] = "MPEG Audio Decoder " MAD_VERSION; 31 | char const mad_copyright[] = "Copyright (C) " MAD_PUBLISHYEAR " " MAD_AUTHOR; 32 | char const mad_author[] = MAD_AUTHOR " <" MAD_EMAIL ">"; 33 | 34 | char const mad_build[] = "" 35 | # if defined(DEBUG) 36 | "DEBUG " 37 | # elif defined(NDEBUG) 38 | "NDEBUG " 39 | # endif 40 | 41 | # if defined(EXPERIMENTAL) 42 | "EXPERIMENTAL " 43 | # endif 44 | 45 | # if defined(FPM_64BIT) 46 | "FPM_64BIT " 47 | # elif defined(FPM_INTEL) 48 | "FPM_INTEL " 49 | # elif defined(FPM_ARM) 50 | "FPM_ARM " 51 | # elif defined(FPM_MIPS) 52 | "FPM_MIPS " 53 | # elif defined(FPM_SPARC) 54 | "FPM_SPARC " 55 | # elif defined(FPM_PPC) 56 | "FPM_PPC " 57 | # elif defined(FPM_DEFAULT) 58 | "FPM_DEFAULT " 59 | # endif 60 | 61 | # if defined(ASO_IMDCT) 62 | "ASO_IMDCT " 63 | # endif 64 | # if defined(ASO_INTERLEAVE1) 65 | "ASO_INTERLEAVE1 " 66 | # endif 67 | # if defined(ASO_INTERLEAVE2) 68 | "ASO_INTERLEAVE2 " 69 | # endif 70 | # if defined(ASO_ZEROCHECK) 71 | "ASO_ZEROCHECK " 72 | # endif 73 | 74 | # if defined(OPT_SPEED) 75 | "OPT_SPEED " 76 | # elif defined(OPT_ACCURACY) 77 | "OPT_ACCURACY " 78 | # endif 79 | 80 | # if defined(OPT_SSO) 81 | "OPT_SSO " 82 | # endif 83 | 84 | # if defined(OPT_DCTO) /* never defined here */ 85 | "OPT_DCTO " 86 | # endif 87 | 88 | # if defined(OPT_STRICT) 89 | "OPT_STRICT " 90 | # endif 91 | ; 92 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_VERSION_H 23 | # define LIBMAD_VERSION_H 24 | 25 | # define MAD_VERSION_MAJOR 0 26 | # define MAD_VERSION_MINOR 15 27 | # define MAD_VERSION_PATCH 1 28 | # define MAD_VERSION_EXTRA " (beta)" 29 | 30 | # define MAD_VERSION_STRINGIZE(str) #str 31 | # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) 32 | 33 | # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ 34 | MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ 35 | MAD_VERSION_STRING(MAD_VERSION_PATCH) \ 36 | MAD_VERSION_EXTRA 37 | 38 | # define MAD_PUBLISHYEAR "2000-2004" 39 | # define MAD_AUTHOR "Underbit Technologies, Inc." 40 | # define MAD_EMAIL "info@underbit.com" 41 | 42 | extern char const mad_version[]; 43 | extern char const mad_copyright[]; 44 | extern char const mad_author[]; 45 | extern char const mad_build[]; 46 | 47 | # endif 48 | -------------------------------------------------------------------------------- /app/src/main/jni/libmad-0.15.1b/version.loT: -------------------------------------------------------------------------------- 1 | # version.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.2 (1.1220.2.60 2004/01/25 12:25:08) Debian: 192 $ 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | -------------------------------------------------------------------------------- /app/src/main/jni/src/SDL_android_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_android_main.c, placed in the public domain by Sam Lantinga 3/13/14 3 | */ 4 | #include "../SDL/src/SDL_internal.h" 5 | 6 | #ifdef __ANDROID__ 7 | 8 | /* Include the SDL main definition header */ 9 | #include "SDL_main.h" 10 | 11 | /******************************************************************************* 12 | Functions called by JNI 13 | *******************************************************************************/ 14 | #include 15 | 16 | /* Called before SDL_main() to initialize JNI bindings in SDL library */ 17 | extern void SDL_Android_Init(JNIEnv* env, jclass cls); 18 | 19 | JNIEXPORT int JNICALL Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject array); 20 | 21 | /* Start up the SDL app */ 22 | JNIEXPORT int JNICALL Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject array) 23 | { 24 | int i; 25 | int argc; 26 | int status; 27 | 28 | /* This interface could expand with ABI negotiation, callbacks, etc. */ 29 | SDL_Android_Init(env, cls); 30 | 31 | SDL_SetMainReady(); 32 | 33 | /* Prepare the arguments. */ 34 | 35 | int len = (*env)->GetArrayLength(env, array); 36 | char* argv[1 + len + 1]; 37 | argc = 0; 38 | /* Use the name "app_process" so PHYSFS_platformCalcBaseDir() works. 39 | https://bitbucket.org/MartinFelis/love-android-sdl2/issue/23/release-build-crash-on-start 40 | */ 41 | argv[argc++] = SDL_strdup("app_process"); 42 | for (i = 0; i < len; ++i) { 43 | const char* utf; 44 | char* arg = NULL; 45 | jstring string = (*env)->GetObjectArrayElement(env, array, i); 46 | if (string) { 47 | utf = (*env)->GetStringUTFChars(env, string, 0); 48 | if (utf) { 49 | arg = SDL_strdup(utf); 50 | (*env)->ReleaseStringUTFChars(env, string, utf); 51 | } 52 | (*env)->DeleteLocalRef(env, string); 53 | } 54 | if (!arg) { 55 | arg = SDL_strdup(""); 56 | } 57 | argv[argc++] = arg; 58 | } 59 | argv[argc] = NULL; 60 | 61 | 62 | /* Run the application. */ 63 | 64 | status = SDL_main(argc, argv); 65 | 66 | /* Release the arguments. */ 67 | 68 | for (i = 0; i < argc; ++i) { 69 | SDL_free(argv[i]); 70 | } 71 | 72 | /* Do not issue an exit or the whole application will terminate instead of just the SDL thread */ 73 | /* exit(status); */ 74 | 75 | return status; 76 | } 77 | 78 | #endif /* __ANDROID__ */ 79 | 80 | /* vi: set ts=4 sw=4 expandtab: */ 81 | -------------------------------------------------------------------------------- /app/src/main/jni/src/libflac_cfg/config.h: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* define to align allocated memory on 32-byte boundaries */ 4 | #define FLAC__ALIGN_MALLOC_DATA 1 5 | 6 | /* define if building for ia32/i386 */ 7 | #undef FLAC__CPU_IA32 8 | 9 | /* define if building for PowerPC */ 10 | #undef FLAC__CPU_PPC 11 | 12 | /* define if building for SPARC */ 13 | #undef FLAC__CPU_SPARC 14 | 15 | /* define if you are compiling for PowerPC and have the 'as' assembler */ 16 | #undef FLAC__HAS_AS 17 | 18 | /* define if you have docbook-to-man or docbook2man */ 19 | #undef FLAC__HAS_DOCBOOK_TO_MAN 20 | 21 | /* define if you are compiling for PowerPC and have the 'gas' assembler */ 22 | #undef FLAC__HAS_GAS 23 | 24 | /* define if you are compiling for x86 and have the NASM assembler */ 25 | #undef FLAC__HAS_NASM 26 | 27 | /* define if you have the ogg library */ 28 | #undef FLAC__HAS_OGG 29 | 30 | /* define to disable use of assembly code */ 31 | #define FLAC__NO_ASM 1 32 | 33 | /* define if your operating system supports SSE instructions */ 34 | #undef FLAC__SSE_OS 35 | 36 | /* define if building for Darwin / MacOS X */ 37 | #undef FLAC__SYS_DARWIN 38 | 39 | /* define if building for Linux */ 40 | #define FLAC__SYS_LINUX 1 41 | 42 | /* define to enable use of 3Dnow! instructions */ 43 | #undef FLAC__USE_3DNOW 44 | 45 | /* define to enable use of Altivec instructions */ 46 | #undef FLAC__USE_ALTIVEC 47 | 48 | /* Define to 1 if you have the header file. */ 49 | #define HAVE_DLFCN_H 1 50 | 51 | /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ 52 | #undef HAVE_FSEEKO 53 | 54 | /* Define to 1 if you have the `getopt_long' function. */ 55 | #undef HAVE_GETOPT_LONG 56 | 57 | /* Define if you have the iconv() function. */ 58 | #undef HAVE_ICONV 59 | 60 | /* Define to 1 if you have the header file. */ 61 | #define HAVE_INTTYPES_H 1 62 | 63 | /* Define if you have and nl_langinfo(CODESET). */ 64 | #undef HAVE_LANGINFO_CODESET 65 | 66 | /* Define to 1 if you have the header file. */ 67 | #define HAVE_MEMORY_H 1 68 | 69 | /* Define to 1 if the system has the type `socklen_t'. */ 70 | #undef HAVE_SOCKLEN_T 71 | 72 | /* Define to 1 if you have the header file. */ 73 | #undef HAVE_STDINT_H 74 | 75 | /* Define to 1 if you have the header file. */ 76 | #define HAVE_STDLIB_H 1 77 | 78 | /* Define to 1 if you have the header file. */ 79 | #undef HAVE_STRINGS_H 80 | 81 | /* Define to 1 if you have the header file. */ 82 | #define HAVE_STRING_H 1 83 | 84 | /* Define to 1 if you have the header file. */ 85 | #define HAVE_SYS_STAT_H 1 86 | 87 | /* Define to 1 if you have the header file. */ 88 | #define HAVE_SYS_TYPES_H 1 89 | 90 | /* Define to 1 if you have the header file. */ 91 | #define HAVE_UNISTD_H 1 92 | 93 | /* Define as const if the declaration of iconv() needs const. */ 94 | #undef ICONV_CONST 95 | 96 | /* Name of package */ 97 | #undef PACKAGE 98 | 99 | /* Define to the address where bug reports for this package should be sent. */ 100 | #undef PACKAGE_BUGREPORT 101 | 102 | /* Define to the full name of this package. */ 103 | #undef PACKAGE_NAME 104 | 105 | /* Define to the full name and version of this package. */ 106 | #undef PACKAGE_STRING 107 | 108 | /* Define to the one symbol short name of this package. */ 109 | #undef PACKAGE_TARNAME 110 | 111 | /* Define to the version of this package. */ 112 | #undef PACKAGE_VERSION 113 | 114 | /* The size of a `void*', as computed by sizeof. */ 115 | #undef SIZEOF_VOIDP 116 | 117 | /* Define to 1 if you have the ANSI C header files. */ 118 | #define STDC_HEADERS 1 119 | 120 | /* Version number of package */ 121 | #define VERSION "1.2.1-sdl2mixer" 122 | 123 | /* Define to 1 if your processor stores words with the most significant byte 124 | first (like Motorola and SPARC, unlike Intel and VAX). */ 125 | #undef WORDS_BIGENDIAN 126 | 127 | /* Number of bits in a file offset, on hosts where this is settable. */ 128 | #undef _FILE_OFFSET_BITS 129 | 130 | /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 131 | #undef _LARGEFILE_SOURCE 132 | 133 | /* Define for large files, on AIX-style hosts. */ 134 | #undef _LARGE_FILES 135 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-hdpi/add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-hdpi/document.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/document_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-hdpi/document_gray.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-hdpi/folder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-hdpi/no.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-hdpi/tick.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-mdpi/add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-mdpi/document.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/document_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-mdpi/document_gray.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-mdpi/folder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-mdpi/no.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-mdpi/tick.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sfalexrog/openxcom-android/6f3476d82fa76c649376b4cef502ed590429c4ac/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_preloader.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/daidalos_file_chooser.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 22 | 23 | 29 | 30 | 31 | 32 | 33 | 38 | 39 |