What are the OpenSL ES and AAudio APIs? Why do they influence the sound of Android?

2023-06-29 16:15:00

Android phones and tablets need an audio API (application programming interface) to manage the sound reproduction of installed applications. They use the OpenSL ES and AAudio APIs to determine how audio files will be played, but if you’re looking to get the best audio quality on streaming apps like Spotify, YouTube Music and others, be aware that these APIs can limit data transmission .

What is it and what are the differences between OpenSL ES API and AAudio API?

What are OpenSL ES and AAudio APIs and how they influence sound on Android. Source: Android Developers Blog

The OpenSL E API (Open Sound Library for Embedded Systems) was used in Android phones and tablets to manage the operating system’s audio. As there is concern regarding device battery life and high resolution files, such as 24 bits/96 KHz, for example, increase battery consumption as they require more processing, the developers decided to make OpenSL E limit all audio playback from Android apps at 48KHz sample rate. However, in recent years, music streaming application companies have decided to adopt lossless audio file transmission, giving rise to a new need.

The pioneers in lossless music streaming were the apps Tidal and Qobuz. For a long time they practically walked alone as the main choices for the most demanding public with audio quality. However, the scenario has changed and in recent years the streaming services Amazon Music, Deezer and Apple Music have started to offer a library of lossless audio files.

The AAudio API came to meet this high definition audio demand and allows the transmission of songs with a resolution of up to 24 bits/192Khz. If your cell phone is more current, it will be present and will allow the playback of tracks with that bit depth and sample rate (sample rate). However, this is only possible if the smartphone has a headphone output and unfortunately this has become increasingly rare to see.

To make it possible to connect a wired headphone to the cell phone without a P2 output (3.5mm), it is necessary to use a “USB adapter for headphones”, which is actually a USB DAC/amp. Connecting a USB DAC/amp allows the conversion of the digital signal, which was sent through the USB port, to analog through a digital to analog signal converter, the DAC (Digital to Analog Converter). The analog signal is necessary for the headphones to work, but the conversion alone is not enough, as it is necessary to amplify it so that the speaker diaphragm (driver) vibrates and generates sound.

If you have doubts regarding which DAC/amp to choose, visit our article where we indicate the best “USB headphone adapters” (USB DAC/amps) of 2023.

Streaming without sample rate limit is not enough

Although it feels like the AAudio API has solved all the issues of limitation in playing the audio in the streaming apps, there will still be the influence on the sound due to running other apps which are running in the background. To resolve this issue, the app responsible for playing the songs must access the Android audio API exclusively. Currently, among all streaming apps, only Tidal is capable of fulfilling this task natively, without the help of third-party apps.

Fortunately, in the case of Qobuz, there is an application capable of forcing the transmission without interference from apps or the operating system. When a connection without influences is obtained, it is said that the perfect bit has been obtained. In our tutorial on the subject, you’ll discover that through the USB Audio Player Pro (UAPP), the Qobuz app plays tracks without interference thanks to the custom audio driver developed by eXtream Software Development, the company responsible for the development of the UAPP.

As we commented in our article on “not all lossless music streaming services are truly lossless”, only Tidal and Qobuz have ways on Android to get audio playback without interference from other apps or the operating system.

What did you think of this article regarding audio on Android? Did you like it? Comment below and share your opinion with us!

1688056763
#OpenSL #AAudio #APIs #influence #sound #Android

Leave a Replay