The document discusses audio latency issues on Android devices. It provides perspective on acceptable latency levels for different types of music (3-23ms) and reaction times (15-70ms). It then covers three classes of audio applications and how latency affects them differently. The bulk of the document dives into technical details of Android's audio stack, including available APIs (MediaPlayer, SoundPool, AudioTrack), hardware considerations (sampling rates, buffer sizes), and how Unity achieves low-latency audio versus a native implementation. It suggests experimenting with different buffer sizes can reduce latency but risks buffer underruns.
Accelerated Linux Core Dump Analysis training public slidesDmitry Vostokov
The slides from Software Diagnostics Services Linux core dump analysis training. The training description: "Learn how to analyse Linux process crashes and hangs, navigate through process core memory dump space and diagnose corruption, memory leaks, CPU spikes, blocked threads, deadlocks, wait chains, and much more. This book uses a unique and innovative pattern-oriented diagnostic analysis approach to speed up the learning curve. The training consists of 13 practical step-by-step exercises using GDB debugger highlighting more than 25 memory analysis patterns diagnosed in 64-bit process core memory dumps. The training also includes source code of modelling applications, a catalogue of relevant patterns from Software Diagnostics Institute, and an overview of relevant similarities and differences between Windows and Linux user space memory dump analysis useful for engineers with Wintel background."
Accelerated Linux Core Dump Analysis training public slidesDmitry Vostokov
The slides from Software Diagnostics Services Linux core dump analysis training. The training description: "Learn how to analyse Linux process crashes and hangs, navigate through process core memory dump space and diagnose corruption, memory leaks, CPU spikes, blocked threads, deadlocks, wait chains, and much more. This book uses a unique and innovative pattern-oriented diagnostic analysis approach to speed up the learning curve. The training consists of 13 practical step-by-step exercises using GDB debugger highlighting more than 25 memory analysis patterns diagnosed in 64-bit process core memory dumps. The training also includes source code of modelling applications, a catalogue of relevant patterns from Software Diagnostics Institute, and an overview of relevant similarities and differences between Windows and Linux user space memory dump analysis useful for engineers with Wintel background."
Connecting Android apps to Android Auto, Ford Sync and other OEM SDKs. Presentation explores the different options available in the world of Driveables.
Give you an overview about
– device virtualization on ARM
– Benefit and real products
– Android specific virtualization consideration
– doing virtualization in several approaches
This talk explores the options when trying to bing up a device using an Android Board Support Package (BSP) or AOSP. In particular the options when you don't want to ship a traditional Android device or you have an existing Embedded Linux code base, but all you have available is Android. Headless can mean both be an Android without Java and a device without a display, both are discussed.
Binder is what differentiates Android from Linux, it is most important internal building block of Android, it is a subject every Android programmer should be familiar with
There are many books, articles and paper publications about Android and related applications but only a few are related to how Android operating system works internally.In this talk we will see how android boots up , an overview of zygote , how system server and package manager works. This talk will be extremely helpful to foster understanding among android developers about Android Internals as well as everybody else who desires a general understanding of the internal working of Android powered devices.
Android is a Linux-based architecture. In addition to the original Linux driver, Android need other additional device driver, like Android Logger, Binder, Low Memory killer, Power Management for android(wakelock), ASHMEM, etc out of which ashmem ,logger and binder are all character device drivers.
The Next-Gen Dynamic Sound System of Killzone Shadow FallGuerrilla
We'll describe our new audio run-time and toolset that was built specifically for Killzone Shadow Fall on PlayStation 4. However, the ideas used are widely applicable and the focus is on integration with the game engine and fast iteration, with special attention to shortcuts to get your creative spark translated into in-game sounds as quickly as possible. We will demonstrate our implementation of these demands, which is a next-gen sound system that was designed to combine artistic freedom with high run-time performance. It should be interesting to both creative as well as technical minds who are looking for inspiration on what to expect from a modern sound design environment. To emphasize the performance advantage, we will show the point of view of both the sound designer and the programmer simultaneously. We will use examples starting with simple sounds and build up to increasingly more complex dynamic ones to illustrate the benefits of this unique approach.
Connecting Android apps to Android Auto, Ford Sync and other OEM SDKs. Presentation explores the different options available in the world of Driveables.
Give you an overview about
– device virtualization on ARM
– Benefit and real products
– Android specific virtualization consideration
– doing virtualization in several approaches
This talk explores the options when trying to bing up a device using an Android Board Support Package (BSP) or AOSP. In particular the options when you don't want to ship a traditional Android device or you have an existing Embedded Linux code base, but all you have available is Android. Headless can mean both be an Android without Java and a device without a display, both are discussed.
Binder is what differentiates Android from Linux, it is most important internal building block of Android, it is a subject every Android programmer should be familiar with
There are many books, articles and paper publications about Android and related applications but only a few are related to how Android operating system works internally.In this talk we will see how android boots up , an overview of zygote , how system server and package manager works. This talk will be extremely helpful to foster understanding among android developers about Android Internals as well as everybody else who desires a general understanding of the internal working of Android powered devices.
Android is a Linux-based architecture. In addition to the original Linux driver, Android need other additional device driver, like Android Logger, Binder, Low Memory killer, Power Management for android(wakelock), ASHMEM, etc out of which ashmem ,logger and binder are all character device drivers.
The Next-Gen Dynamic Sound System of Killzone Shadow FallGuerrilla
We'll describe our new audio run-time and toolset that was built specifically for Killzone Shadow Fall on PlayStation 4. However, the ideas used are widely applicable and the focus is on integration with the game engine and fast iteration, with special attention to shortcuts to get your creative spark translated into in-game sounds as quickly as possible. We will demonstrate our implementation of these demands, which is a next-gen sound system that was designed to combine artistic freedom with high run-time performance. It should be interesting to both creative as well as technical minds who are looking for inspiration on what to expect from a modern sound design environment. To emphasize the performance advantage, we will show the point of view of both the sound designer and the programmer simultaneously. We will use examples starting with simple sounds and build up to increasingly more complex dynamic ones to illustrate the benefits of this unique approach.
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Maarten Balliauw
After buying a set of Sonos-compatible speakers at IKEA, I was disappointed there's no support for playing audio from a popular video streaming service. They stream Internet radio, podcasts and what not. Well, not that service I want it to play!
Determined - and not knowing how deep the rabbit hole would be - I ventured on a trip that included network sniffing on my access point, learning about UPnP and running a web server on my phone (without knowing how to write anything Android), learning how MP4 audio is packaged (and has to be re-packaged). This ultimately resulted in an Android app for personal use, which does what I initially wanted: play audio from that popular video streaming service on Sonos.
Join me for this story about an adventure that has no practical use, probably violates Terms of Service, but was fun to build!
Tips for live streaming a musical performancePaul Richards
Live streaming a musical performance can be a difficult task, but using the latest technology for software, hardware and of course audio plugins... you can create television quality productions on a budget! In this presentation, we walk you through our small band setup which includes video camera placement, audio setup, audio optimization and tips for success. We share with you how to be successful providing your talent with studio techniques such as tally lights so they know which camera to look at. We look at the latest in VST3 plugins for real time audio processing to enhance instruments and vocals to sound amazing. In fact, we have a full tutorial video available here, where we go over all of our audio plugins and explain how to make your audio sounds like it's ready for radio!
6. In this talk, we will demystify
together where exactly those
time difference went to!
7. Some numbers, for perspective
• Acceptable latency for musicians
• Vocals : 3ms - voice is literally “in your head”
• Drums & Percussions : 6ms - you sit right in front of them
• Guitars : 12ms - may take time in the effect chains
• Keyboards : 23ms - goes through several sound chambers’ acoustics
Sound On Sound : Optimising The Latency Of Your PC Audio Interface
https://www.soundonsound.com/techniques/optimising-latency-pc-audio-interface#para7
8. Some numbers, for perspective
• Simple Reaction Time (SRT)
Factors influencing the latency of simple reaction time
David L. Woods, John M. Wyma, E. William Yund, Timothy J. Herron, and Bruce Reed
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4374455/
9. Some numbers, for perspective
• Rhythm game’s highest (perfect) judgements, by player’s research
• Dynamix 59ms
• Deemo 50ms
• Jubeat 41ms
• Bang Dream! 40ms
• Sound Voltex 33ms
• Arcaea 25ms
• Pop’n Music 25ms
• Chunithm, Taiko no Tatsujin 33ms
• VOEZ 30ms
• Beatmania IIDX 20ms
• Cytus 70ms
• DDR 15ms
Data compiled by @Sta_Light_
https://twitter.com/Sta_Light_/status/1020704143231500289
12. 3 Classes of audio applications
• Sequencer class - Latency does not matter
• Music player : No one cares about latency.
• Sequencer / Digital Audio Workstation : Able to compensate for the latency.
• Instrument class - Latency may matter
• Possible to “adapt to the latency”, just like a real instrument.
• UI button sounds
• Rhythm game class - Latency affects user experience greatly! Music is now tied
to the gameplay.
• Music games without response sound : compensate for latency is possible.
• Music games with response sound : either perfect judgement with wrong
response sound, or early judgement with in-time response sound.
17. Each device do “prefer” something
• Native Sampling Rate
• Older mostly 44000Hz, newer phones moved to 48000Hz
• Optimal Buffer Size
• The lower the better latency-wise. Bad phone cannot handle small buffers
• Low Latency Feature (true / false)
• Indicates a continuous output latency of 45 ms or less
• Pro Audio Feature (true / false)
• Indicates a continuous round-trip latency of 20 ms or less
18. Each device do “prefer” something
Native Sampling Rate : 44100Hz
Optimal Buffer Size : 640
Low Latency : False
Pro Audio : False
Native Sampling Rate : 44100Hz
Optimal Buffer Size : 240
Low Latency : False
Pro Audio : False
Native Sampling Rate : 48000Hz
Optimal Buffer Size : 192
Low Latency : True
Pro Audio : True
Go download a test app at https://superpowered.com/latency to see yours!
21. Introduction to all the API options!
MediaPlayer
SoundPool
AudioTrack (Java)
AudioTrack (C++)
“Tracks”
OpenSL ES AAudio
Thread
Thread
Thread
HAL
Java
C++
Hardware
Abstraction
Layer
22. Introduction to all the API options!
MediaPlayer
SoundPool
AudioTrack (Java)
AudioTrack (C++)
“Tracks”
OpenSL ES AAudio
Thread
Thread
Thread
HAL
Java
C++
Hardware
Abstraction
Layer
23. Introduction to all the API options!
MediaPlayer
SoundPool
AudioTrack (Java)
AudioTrack (C++)
“Tracks”
OpenSL ES AAudio
Thread
Thread
Thread
HAL
Java
C++
Hardware
Abstraction
Layer
Let’s start from the
lowest level
So we know what higher level APIs ultimately maps to.
24. AudioTrack (C++)
No matter what, it must comes down to this!
• Our important question : How differently Unity used the AudioTrack than our
“naive” native audio playing that results in that much latency?
30. Mixer Threads
• Fast Mixer
• Up to 7 fast tracks
• Mix normal mixer’s submix
• Track attenuation (volume)
• NO :
• Resampling
• Effects
• Normal Mixer
• Up to 32 tracks
• Can play any sampling rate by sample rate conversion + effects
Mixer Thread
Fast Mixer Thread
Normal Mixer Thread
Normal Mixer Thread
43. OpenSL ES
• An open source set of OpenGL-style audio commands. Implementers are
free to maps to anything.
• It maps to `AudioTrack` (C++) on Android.
• Possible to get fast track.
45. AudioTrack (Java)
• `new AudioTrack()` = or
• Still must feed audio stream.
• Possible to get fast track.
• `new AudioTrack()` x32 = crash
46. SoundPool
• `new SoundPool()` does not instantiate any track yet.
• Dynamically instantiate tracks as you play. (Can set a limit) Possible to get a
fast track.
• Get a track index back on every play.
• Supports loading a file, storing multiple audio inside, loop, pause, resume,
etc.
47. MediaPlayer
• Cannot get fast track.
• Full-blown media player with video support.
• Not good for latency.
58. Buffer Underrun
• Lower ring buffer size equals better latency, but with a risk of
running out of data.
• Exporting to PC build with Best Latency easily cause buffer
underrun.
• Exporting to Android with Best Latency usually works but I
know a case that does not work.