Stay organized with collections
Save and categorize content based on your preferences.
High performance audio apps typically require more functionality than the simple
ability to play or record sound. They demand responsive realtime system
behavior. Some typical use cases include:
Digital audio workstations
Synthesizers
Drum machines
Music learning apps
Karaoke apps
DJ mixing
Audio effects
Video/audio conferencing
This section explains the general principles of minimizing
audio latency.
It also provides advice about audio sampling,
to help you choose the optimal sample rate and consider the pros and cons of using floating-point
numbers to represent your audio data.
The rest of the section describes the two libraries that
are available for writing high-performance audio applications:
OpenSL ES is an Android-specific
implementation of the OpenSL ES™ API specification from the Khronos Group.
OpenSL ES is not recommended for new designs. App developers and middleware
providers should target either Oboe or AAudio as the native audio interface.
AAudio was developed as a lightweight,
native Android alternative to the OpenSL ES library. The AAudio API is smaller
and easier to use than OpenSL ES.
Additional resources
To learn more, take advantage of the following resources:
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2021-10-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-10-26 UTC."],[],[],null,["# High-performance audio\n\nHigh performance audio apps typically require more functionality than the simple\nability to play or record sound. They demand responsive realtime system\nbehavior. Some typical use cases include:\n\n- Digital audio workstations\n- Synthesizers\n- Drum machines\n- Music learning apps\n- Karaoke apps\n- DJ mixing\n- Audio effects\n- Video/audio conferencing\n\nThis section explains the general principles of minimizing\n[audio latency](/ndk/guides/audio/audio-latency).\nIt also provides [advice about audio sampling](/ndk/guides/audio/sampling-audio),\nto help you choose the optimal sample rate and consider the pros and cons of using floating-point\nnumbers to represent your audio data.\n\nThe rest of the section describes the two libraries that\nare available for writing high-performance audio applications:\n\n- [OpenSL ES](/ndk/guides/audio/opensl) is an Android-specific implementation of the OpenSL ES™ API specification from the Khronos Group. OpenSL ES is not recommended for new designs. App developers and middleware providers should target either Oboe or AAudio as the native audio interface.\n- [AAudio](/ndk/guides/audio/aaudio/aaudio) was developed as a lightweight, native Android alternative to the OpenSL ES library. The AAudio API is smaller and easier to use than OpenSL ES.\n\n| **Note:** Developers should consider using the open source Oboe library which is available on [GitHub](https://github.com/google/oboe). Oboe is a C++ wrapper that provides an API that closely resembles AAudio. It calls AAudio when it is available, and falls back to OpenSL ES if AAudio is not available.\n\nAdditional resources\n--------------------\n\nTo learn more, take advantage of the following resources:\n\n\u003cbr /\u003e\n\n### Sample\n\n- [Oboe Samples](https://github.com/google/oboe/tree/master/samples)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### Codelabs\n\n- [Making Waves Part 1 - Build a Synthesizer](/codelabs/making-waves-1-synth)\n- [Making More Waves - Sampler](/codelabs/making-waves-2-sampler)\n- [Build a Musical Game using Oboe](https://developer.android.com/codelabs/musicalgame-using-oboe)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### Videos\n\n- [Getting Started with Oboe](http://bit.ly/Introducing-Oboe)\n- [Best Practices for Android Audio (Google I/O '17)](https://www.youtube.com/watch?v=C0BPXZIvG-Q)\n\n\u003cbr /\u003e"]]