OpenSL ES™ is a royalty-free, cross-platform, hardware-accelerated audio API tuned for embedded systems.
Questions tagged [opensl]
193 questions
4
votes
2 answers
Android 2.3.4, OpenSL ES and huge log-spamming for unknown reason
One app that I created causes extensive log-spamming on a device of a customer:
I use OpenSL in a NDK environment for realtime audio generation. Everytime I use the Enqueue() function of the SLAndroidSimpleBufferQueueItf, android creates a log entry…

Lyve
- 218
- 1
- 11
4
votes
0 answers
Android AlertDialog freezes application some seconds after shown - cause seems OpenSL related
Ok I tried "everything" I could have found around and read everything I searched for, the question is quite simple yet I can't understand what the problem is.
I am working with the NDK ( Native code in CPP ).
I have a very simple Activity that has…

Ivan Goat
- 41
- 3
4
votes
3 answers
OpenSL ES alternative on Android
I am building an app for android where it is nessessary, to play pcm data in a queue-player as float. As far as I can see that it is not possible. The description says:
SL_DATAFORMAT_PCM does not permit the application to specify the representation…

andre
- 1,618
- 2
- 19
- 38
3
votes
1 answer
Sound effect mixing with OpenSL on Android
I'm currently implementing a sound effect mixing on Android via OpenSL. I have an initial implementation going, but I've encountered some issues.
My implementation is as follows:
1) For each sound effect I create several AudioPlayer objects (one for…

Mark
- 261
- 2
- 5
3
votes
2 answers
Does a finished buffer from an OpenSL ES audio player need to be freed?
Just for confirmation. When an audio player, created via OpenSL ES for Android, finishes playing a buffer, is that buffer automatically freed by the Garbage collector? Or do I need to free the buffer myself?
If it is the latter, I could use some…

ThaMe90
- 4,196
- 5
- 39
- 64
3
votes
0 answers
Send audio data to ibm watson speech recognizer using OpenSL ES
I am currently using OpenSL ES to get audio data from the local device's microphone. I am using a PipedStream to send the audio data to the ibm watson speech recognizer using websocket but I am not getting any results and I am not entirely sure why.…

UsernameGoesHere1
- 95
- 8
3
votes
0 answers
processes started with Runtime.getRuntime().exec() candidates for killing?
The problem with most (if not all) equalizer apps for android is they getting killed when OS runs low on resources. (Some have the ability to restart after a short timeout) If you wear earphones when the app suddenly dies, the volume may suddenly…

basin
- 3,949
- 2
- 27
- 63
3
votes
1 answer
Android OpenSL Audio Buffer underrun with native sample rate/buffer size (only some devices)
Looks like I'm getting an issue of crackling/glitchy audio (basically when a buffer doesn't get filled up/callback doesn't finish in time/buffer underrun situation) even after setting the device's preferred sample rate and buffer size while using…

yun
- 1,243
- 11
- 30
3
votes
0 answers
OpenSL audio controlled by global equalizer/effects
Is it possible for an OpenSL application to be registered in the global output mix so that apps such as the default "Audio Effects" app (the one that opens when you select the equalizer in Google Play Music, for example) or other global…

Steve M
- 9,296
- 11
- 49
- 98
3
votes
1 answer
How to grant more permissions to android shell user?
I build some command line tool with ndk and execute it in /data/local/tmp. Now it prompts me "requires android.permission.RECORD_AUDIO" when I call some OpenSLES API in my command line tool:
W/AudioRecord( 4226): AUDIO_INPUT_FLAG_FAST denied by…

skywind3000
- 31
- 1
- 3
3
votes
3 answers
Android ndk example native-audio error
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 from…

user3393426
- 61
- 1
- 5
3
votes
0 answers
Stopping a sound with openSL
How can I stop a sound which is played in a native app on android using openSL ES ? For example, I want to play a music while the player navigates in the game menu but as soon as he starts a game I need to stop the music. I use bufferqueue to play…

Geolm
- 61
- 5
3
votes
1 answer
OpenSL ES Android: "Too many objects" SL_RESULT_MEMORY_FAILURE
I'm having a problem with OpenSL ES on Android. I'm using OpenSL to play sound effects. Currently I'm creating a new player each time I play a sound. (I know this isn't terribly efficient, but it's "good enough" for the time being.)
After a while of…

Ryan
- 545
- 1
- 5
- 16
3
votes
1 answer
How to configure OpenSL to work with ear speaker other than main speaker or headphones
I've tried the native-audio code sample in android NDK. When i try to record some speech and then play it back it works fine. It uses the main speaker(loud speaker) for the speech playback. I want to modify the code so that the speech is played in…

Reaz Murshed
- 23,691
- 13
- 78
- 98
3
votes
1 answer
Android OpenSLES Buffer Starvation issue
I am trying to work around the following issue in Android OpenSLES.
The OpenSLES Spec Says the following:
http://www.khronos.org/registry/sles/specs/OpenSL_ES_Specification_1.0.1.pdf
- 8.12
When the player is in the SL_PLAYSTATE_PLAYING state,…

Baggers
- 3,183
- 20
- 31