Questions tagged [opensl]

OpenSL ES™ is a royalty-free, cross-platform, hardware-accelerated audio API tuned for embedded systems.

193 questions
0
votes
1 answer

OpenSL audio on Android stop when I lock screen 5.0.1 OK 6.0.1 Not OK

I made an android app, that streams voice from local wifi network. To listen and stream I use Opus C API in JNI to decode, and OpenSL Audio to read. I call the JNI from Service, like that. public class StreamService extends Service { …
maathor
  • 121
  • 1
  • 3
  • 12
0
votes
1 answer

OpenSL ES noise when starting to play new buffer

I am using OpenSL ES to play audio on Android. I am experiencing an issue when one buffer in the playback queue ends and another starts, there is often a slight cracking sound between them. Is it a known issue? How can I avoid it?
Andres Traumann
  • 144
  • 1
  • 8
0
votes
1 answer

How to get the waveform with OpenSL ES?

Or even better, how to get the size of the amplitude or the volume of the wave sound every certain time. In fact I need the two ways, the full waveform and measure it each time. the first one for have a view of the song wave and the second one for…
quetzalfir
  • 528
  • 7
  • 22
0
votes
1 answer

Play audio in background without interrupting mediaplayer

How can I play background audio, in Android, without interrupting the MediaPlayer playback, by either using MediaPlayer (preferred) or OpenSL ES? I know SoundPool is able to play sound effects without interrupting any MediaPlayer playback, but the…
Leandros
  • 16,805
  • 9
  • 69
  • 108
0
votes
2 answers

Generating sound on Android with OpenSL ES

I'm making audio app on Android and I have simple generation of three types of sound waves - Sine, Sawtooth and Square. Generating of waves is fine. I printed out the result and it's looking good. But the sound is weird. Here is what I…
Syntey
  • 147
  • 1
  • 15
0
votes
0 answers

Audio synthesis on Android with OpenSL ES

I'm making audio app on Android with use of some synthesis, FM or AM. I'm using OpenSL for lower latency. I used Audiotrack library and latency was horible, but making a sound is way easier than with OpenSL. I started with Native Audio project.…
Syntey
  • 147
  • 1
  • 15
0
votes
1 answer

Replace Default MIC using OpenSL ES(Native-audio in Android)

I am new to Android Native audio using OpenSL ES and I need your help. Now I wanna write an app to do real-time recording and playing back. In recording part, we have to configure the audio source firstly when we are creating an audio recorder. Like…
Yiya.Hao
  • 3
  • 3
0
votes
1 answer

Android Opensl-es cannot get frequency (kHz)

I am having problem with OpenSL ES in Android frequency problem. Using OpenSL ES, I want to create sine wave with 44.1kHz waveform. My source codes is as follows. Following source makes 44.1Hz sine wave but Not 44.1kHz. Somewhere I am missing x1000…
0
votes
0 answers

opensl es crash when pausing the player

Can someone please help me figure out the problem here": I am using opensl es to play audio and it crashes when I try to pause the Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbd32e932 in tid 17523 (Thread-4343) and here is my…
Saeid Farivar
  • 1,667
  • 24
  • 43
0
votes
1 answer

OpenSL Amplify signal

Passing PCM data (from Midi) to OpenSL-ES I am searching a way to amplify the PCM signal. In OpenSL-ES I see interfaces for Bass boosting and Equalization but not one for amplification (gain above max Volume). Is there a straight way for this?.…
tru7
  • 6,348
  • 5
  • 35
  • 59
0
votes
1 answer

OpenSL: What's causing static when loading wav files through AAsset_read?

I'm working on a native android project and trying to use OpenSL to play some audio effects. Working from the native audio sample project VisualGDB provides, I've written the code posted below. Near the end, you can see I have commented a line that…
Wes Paugh
  • 161
  • 1
  • 10
0
votes
3 answers

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

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…
0
votes
1 answer

How to use native OpenSL ES in android studio

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…
Pankaj
  • 327
  • 3
  • 14
0
votes
0 answers

How i can destroy playerObj?

i'm trying creating engine and output Mix: // create engine this->res = slCreateEngine(&this->engineObject, 0, NULL, 0, NULL, NULL); if (SL_RESULT_SUCCESS != this->res) { LOGI("Can't Create Engine."); this->Free(); return; } this->res =…
0
votes
1 answer

How to Play audio in a call with out enabling speaker phone mode?

How to play a prerecorded file on call in Android? Its possible to play with speaker phone mode, but it gives a noisy output. Is there any alternative?
tvshajeer
  • 1,299
  • 2
  • 12
  • 26