Escolar Documentos
Profissional Documentos
Cultura Documentos
=================================
Csound 6 for Android includes the Csound library for Android, the Csound6
app front end for the library, an app containing several demos of the
library, and some plugins for Csound.
These instructions are for MinGW/MSys on Windows, but should mostly apply on
other platforms as well. You need the following tools.
In your MSys shell, you use the following shell script or other
facility to set the environment variables that are used by the Android build:
export SDK=/d/Android/adt-bundle-windows-x86-20130514/sdk
export NDK=/d/Android/android-ndk-r8e
export ANDROID_NDK_ROOT=$NDK
export CSOUND_HOME=/c/Users/new/csound-csound6-git
export NDK_MODULE_PATH=${CSOUND_HOME}/android/pluginlibs
export PATH=${PATH}:$NDK_MODULE_PATH
export NDKABI=9
export NDKVER=$NDK/toolchains/arm-linux-androideabi-4.7
export NDKP=$NDKVER/prebuilt/windows/bin/arm-linux-androideabi-
export NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
export NDKARCH="-march=armv7-a -mfloat-abi=softfp -Wl,--fix-cortex-a8"
Once the above environment variables are set, you can use the following
scripts to build the Csound library as well as plugin libraries:
To save build time, most native libraries are built as NDK modules so as
to be available as pre-built shared libraries. The complete build
may be outlined as follows.
The plugin projects are built before Csound itself, because Csound
requires the libsndfile shared library, which is built by the libstdutil
module.
$NDK/ndk-build
$NDK/ndk-build
Change to $(NDK_MODULE_PATH) and use Git to clone the LuaJIT head there.
Change to the LuaJIT directory and execute:
$NDK/ndk-build
./build.sh
This will call SWIG to generate Java bindings to the NDK module for Csound 6,
then build and install the Csound 6 CsoundAndroid module.
This script will also call install_libs.sh (which can be run separately) to
install the above-mentioned local shared libraries in the CsoundAndroid
libs directory, so that they will be included in the .apk file.
Configure Eclipse for the Android SDK and for the Android NDK.
CSDPlayer
CsoundAndroid
CsoundAndroidExamples
Make sure that the project.properties files are consistent with the
environment variables about the Android configuration, e.g. if $NDKABI is 9,
then (a) the Android target version must be available when you inspect the
Android SDK Manager configuration tool, and (b) the properties files must
specify a target equal to or higher than the than $NDKABI, e.g. on my system
it is target=android-10.
Connect your ARMv7 Android 2.3.3 or higher device to Eclipse with a USB cable. Run
the Csound6 project. This wll create the .apk file as well.