Android high-performance audio - Google I/O 2016
Why Stack Overflow recommends it
Stack Overflow users link it when answering or asking about Android audio latency, OpenSL ES thread priority and CPU throttling, and why native low-latency audio paths matter.
Recommended by 1 people across 1 different months, 2016 to 2023.
What it is
A 36-minute Google I/O 2016 session from the Android audio team on achieving low-latency, high-performance audio on Android. It covers real performance problems app developers hit, how to solve them, and remaining platform challenges and plans.
What people said
Recommends gal · 2016-05 · Stack Overflow · on “Android with Nexus 6 -- how to avoid decreased OpenSL audio thread priority relating to app focus?”
While watching the latest Google I/O 2016 audio presentation, I finally found the cause and the (ugly) solution for this problem. Just watch the around one minute of this you tube clip (starting at 8m56s): [this video] It explains why this is happening and how you can get rid of it. In fact, Android slows the CPU down after a few seconds of touch inactivity to reduce the battery usage. The guy in the video promises a proper solution for this soon, but for now the only way to get rid of it is to send fake touches (that's the official recommendation). Instrumentation instr = new Instrumentation(); instr.sendKeyDownUpSync(KeyEvent.KEYCODE_BACKSLASH); // or whatever event you prefer Repeat this with
Cites user1147171 · 2016-09 · Stack Overflow · on “Android: play multiple mp3s simultaneously, with precise sync and independent volume control”
I want to create an Android app that plays multiple mp3s simultaneously, with precise sync (less than 1/10 of a second off) and independent volume control. Size of each mp3 could be over 1MB, run time up to several minutes. My understanding is that MediaPlayer will not do the precise sync, and SoundPool can't handle files over 1MB or 5 seconds run time. I am experimenting with superpowered [LINK] and may end up using that, but I'm wondering if there's anything simpler, given that I don't need any processing (reverb, flange, etc.), which is superpowered's focus. Also ran across the YouTube video on Android high-performance audio, from Google I/O 2016. Wondering if anyone has any experience wi
Cites Mandar Sadye · 2018-12 · Stack Overflow · on “How to Reduce latency when repeating the input audio from a microphone as the output audio to the speaker in Android App”
Just as an experiment I am trying to create an app that can repeat the input audio from a microphone as the output audio to the speaker. Till now I am able to do it with a latency of around 0.5 to 1 seconds. So if anyone has any idea about how to improve the code below to reduce latency. From Android high-performance audio - Google I/O 2016 [this video] I saw that in-out latency can be as low as 20ms which is way lesser than what I am getting. I tried searching on google and other questions on StackOverflow but most of the methods used there are deprecated in API level 26. private fun recordAndPlay(){ val audioManager = this.getSystemService(Context.AUDIO_SERVICE) as AudioManager val rate = audio
Cites Morrison Chang · 2023-06 · Stack Overflow · on “Can MIDI note data be created and sent to the native Android player using only native SDK code?”
Your doc link [LINK] is for MIDI device connectivity for Android. Android requires some hoops to play MIDI notes with the existing built-in synthesizer through the audio output of Android. Realize that the SONiVOX dates back to Android 1.0 and will never be updated. Modern audio apps should be using Oboe (OpenSL ES/AAudio) due to a lack of audio-latency requirements [LINK] in older Android. See vid: Android high-performance audio [this video]