FAQ Database Discussion Community


C - Why compare constants with & instead of switch/if?

c,switch-statement,comparison,ampersand,opensl
I am reading the OpenSL documentation for Android. Quoting the following document: http://mobilepearls.com/labs/native-android-api/ndk/docs/opensles/ "Callback handlers should be prepared to be called more or less frequently, to receive additional event types, and should ignore event types that they do not recognize. Callbacks that are configured with an event mask of enabled...

How to use native OpenSL ES in android studio

android,android-studio,android-ndk,opensl
I need to develop an audio app in NDK using Android Studio. I have added the ndk path to local.properties - ndk.dir=/opt/android-ndk-r10 sdk.dir=/opt/adt-bundle-linux-x86_64-20140702/sdk In build.gradle I added an entry for OpenSLES - apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.hellojni" minSdkVersion 8 targetSdkVersion 21 ndk...

Android ndk example native-audio error

android-studio,android-ndk,opensl
I try to use the example code for OpenSl ES wich is included in NDK in Android Studio. It didn't work as you will see later on. So I need help to use the code in Android Studio. The Code was written for Eclipse but I used the import function...