OpenSL ES™ is a royalty-free, cross-platform, hardware-accelerated audio API tuned for embedded systems.
Questions tagged [opensl]
193 questions
2
votes
1 answer
Add OpenSL to android
im very confused with NDK and with OpenSL
Im trying to add OpenSL to my project. And have some problems. When i create ndk project- i dont have file Android.mk
but i have CMakeList
in tutorials everywhere talks about android.mk where need write one…

Peter
- 2,480
- 6
- 39
- 60
2
votes
0 answers
Android samsung disable remote recording
I am doing audio recording on Android.
I see that in Android-7 on Samsung it doesn't record the remote party.
I read that some manufacturers have blocked it.
But some apps (like ACR and Boldbeast Audio recorder) overcome this problem.
Any clue will…

ShlomoA
- 31
- 1
- 4
2
votes
1 answer
undefined reference to slCreateEngine
I want to play sound through opensl. Connected library Linker-> Input-> Library Dependencies - OpenSLES. The linker produces an error - undefined reference to slCreateEngine.

Александр Патейчук
- 29
- 1
- 1
2
votes
1 answer
OpenSL ES change audio source without recreating audio player
I have a layout that has about 60 buttons and each one, when pressed, plays a different audio file. I have all my audio files as mp3s in my assets folder and to play them I'm basically using the same code as is used in the Google NDK samples…

J Garcia
- 806
- 1
- 7
- 17
2
votes
1 answer
OpenSL on Android plays at a higher rate than it should
I managed to create an OpenSL context and all so that it plays sound.
But I still have a problem: I set the samplesPerSec for my Player to 44.100 Hz but it actually runs at ~ 70.000 Hz. How could one fix that?
Well I'll show you what I've done (full…

fodinabor
- 451
- 5
- 15
2
votes
0 answers
Android openSL: SL_IID_ANDROIDCONFIGURATION and Fast Audio Path
This message is a copy from the question I asked at android-ndk googlegroups, which unfortunately still didn't get any answer. I hope I will find some hints here. Thanks.
1st Question: FastTrack created even with SL_IID_ANDROIDCONFIGURATION...
I…

Andrés Pérez
- 21
- 4
2
votes
1 answer
Android fast path audio loopback
I'm trying to create audio loopback with minimal delay. Started with Android API using the AudioRecorder and AudioTrack, but the delay is too big.
Then I started digging in NDK and fast path audio using OpenSL.
But C++ is not among my strenghts.…

Lubos Horacek
- 1,562
- 10
- 28
2
votes
0 answers
Fixed : Audio recorder missing a callback protector?
According to this:
https://android-review.googlesource.com/#/c/105606/
The bug which would cause the openSL API function 'Destroy' to never return in some instances has been been fixed.
My question is:
Is getting access to this fix just a matter of…

user1884325
- 2,530
- 1
- 30
- 49
2
votes
1 answer
"Missed SL_PLAYEVENT_HEADATNEWPOS for position" message
I wrote a music player using OpenSL ES. It works fine besides one warning message coming out of libOpenSLES library. Here is the message.
03-05 00:10:15.367: W/libOpenSLES(12055): Missed SL_PLAYEVENT_HEADATNEWPOS for position 7000; current position…

sergej shafarenka
- 20,071
- 7
- 67
- 86
2
votes
2 answers
Android OpenSL "pAudioSrc: data format 2 not allowed" - denying SL_DATAFORMAT_PCM?
I'm trying to create an AudioPlayer with a bufferqueue source and outputmix sink. I've configured the source with a pcm format very similar to that shown in the ndk samples, but OpenSL is rejecting SL_DATAFORMAT_PCM ("data format 2"). This doesn't…

mxdubois
- 605
- 8
- 14
2
votes
1 answer
Playing generative sound with OpenSL
I'm building an app that will generate sound (for now it's mostly experimental) and play it on an Android phone.
For now I'm trying to play a simple sinewave sound (440 Hz), and first tried with an Audiotrack but experienced some buffer underrun.…

XGouchet
- 10,002
- 10
- 48
- 83
2
votes
0 answers
With opensles do you need a seperate audio player for each mp3 you want to play simultaneously?
I have seen how the output-mix can be shared between players but I am wondering how you would play multiple mp3 files simultaneously without using multiple players.
Obviously I could decode the mp3s with a 3rd party library (e.g. ffmpeg) and then…

Baggers
- 3,183
- 20
- 31
2
votes
1 answer
Voice call in android using OpenSL
I'm doing a VoIP application for my thesis. I would like to know if someone can help me with this scenario:
I have two threads, AudioThread and AudioSendThread. The first one its the listener that receive the audio-packet throught a DatagramSocket…

Oxenarf
- 200
- 6
- 23
2
votes
1 answer
OpenSL - Poor Seeking with Audio Player Object
I'm writing an Android application that needs to be able to seek to specific points in a large mp3 audio file (~90minutes) with good accuracy.
Currently, I'm using an OpenSL approach with an audio player object with a URI data source that specifies…

rmigneco
- 595
- 4
- 16
2
votes
1 answer
How many PCM AudioPlayer I can create in OpenSL SE for Android
I've known only 32 objects which we can create in OpenSL SE Android,
but when I create PCM AudioPlayer with following code, I got error when the 11st AudioPlayer has been created.
The AudioPlayer can be used normally, the sound can be played…

icefrost
- 21
- 3