OpenSL ES
Stay organized with collections
Save and categorize content based on your preferences.
WARNING: OpenSL ES is deprecated. Developers should use the open source
Oboe library which is available on GitHub.
Oboe is a C++ wrapper that provides an API that closely resembles
AAudio. Oboe calls AAudio when AAudio is
available, and falls back to OpenSL ES if AAudio is not available.
The NDK package includes an Android-specific implementation of the
OpenSL ES™ 1.0.1 API
specification from the Khronos Group.
This library lets you use C or C++ to implement high-performance, low-latency audio, whether
you are writing a synthesizer, digital audio workstation, karaoke, game,
or other real-time app.
The OpenSL ES™ standard exposes audio features
similar to those in the MediaPlayer
and MediaRecorder
APIs in the Android Java framework. OpenSL ES provides a C language interface as well as
C++ bindings, allowing you to call the API from code written in either language.
The OpenSL ES APIs are available to help you develop and improve your app's audio performance.
The standard OpenSL ES headers <SLES/OpenSLES.h> and
<SLES/OpenSLES_Platform.h> allow audio input and output. Additional
Android-specific functionality is in <SLES/OpenSLES_Android.h> and
<SLES/OpenSLES_AndroidConfiguration.h>.
This section begins by explaining
how to incorporate OpenSL ES into your app.
Next, it explains what you need to know
about the Android implementation of OpenSL ES, focusing first on the
differences between this implementation and the
reference specification and then
additional extensions
for Android compatibility. This section concludes with some supplemental
programming notes to ensure proper
implementation of OpenSL ES.
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 2024-09-12 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 2024-09-12 UTC."],[],[],null,["# OpenSL ES\n\nWARNING: OpenSL ES is **deprecated** . Developers should use the open source\nOboe library which is available on [GitHub](https://github.com/google/oboe).\nOboe is a C++ wrapper that provides an API that closely resembles\n[AAudio](/ndk/guides/audio/aaudio/aaudio). Oboe calls AAudio when AAudio is\navailable, and falls back to OpenSL ES if AAudio is not available.\n\nThe NDK package includes an Android-specific implementation of the\n[OpenSL ES™](https://www.khronos.org/opensles/) 1.0.1 API\nspecification from the [Khronos Group](https://www.khronos.org).\nThis library lets you use C or C++ to implement high-performance, low-latency audio, whether\nyou are writing a synthesizer, digital audio workstation, karaoke, game,\nor other real-time app.\n\n\nThe OpenSL ES™ standard exposes audio features\nsimilar to those in the [MediaPlayer](/reference/android/media/MediaPlayer) and [MediaRecorder](/reference/android/media/MediaRecorder)\nAPIs in the Android Java framework. OpenSL ES provides a C language interface as well as\nC++ bindings, allowing you to call the API from code written in either language.\n\n\nThe OpenSL ES APIs are available to help you develop and improve your app's audio performance.\n\n\nThe standard OpenSL ES headers \\\u003cSLES/OpenSLES.h\\\u003e and\n\\\u003cSLES/OpenSLES_Platform.h\\\u003e allow audio input and output. Additional\nAndroid-specific functionality is in \\\u003cSLES/OpenSLES_Android.h\\\u003e and\n\\\u003cSLES/OpenSLES_AndroidConfiguration.h\\\u003e.\n\nThis section begins by explaining\n[how to incorporate OpenSL ES into your app](/ndk/guides/audio/opensl/getting-started).\nNext, it explains what you need to know\nabout the Android implementation of OpenSL ES, focusing first on the\n[differences](/ndk/guides/audio/opensl/opensl-for-android) between this implementation and the\nreference specification and then\n[additional extensions](/ndk/guides/audio/opensl/android-extensions)\nfor Android compatibility. This section concludes with some supplemental\n[programming notes](/ndk/guides/audio/opensl/opensl-prog-notes) to ensure proper\nimplementation of OpenSL ES."]]