Audio is a very important feature for mobile development. There are tons of apps that are aware of the relevance of providing great audio to create amazing experiences for Android users. A C++ library, named Oboe, for building high performance -or low latency- audio apps has been recently introduced.   

According to official Android developers accounts, Oboe offers the lowest latency possible across 99% of Android devices.

Nowadays, users expect things to happen pretty fast, if something is getting delay for some reason they soon lose interest. That is why creating an immediate interaction between the user and the app is such a big deal.

Whether you need to record or playback sounds in your Android app as soon as users touch their mobiles screens, then Oboe is here to help you.

Oboe is compatible with 99% of Android devices because it works with API level 16 (Jelly Bean) and above, allowing developers to target a simplified API that delivers a better audio experience.

Oboe makes use of both AAudio (an audio API introduced in Android Oreo) to provide high performance audio and OpenSL ES to maintain compatibility.  

You might be also interested in: Great Android apps for listening to music

Oboe benefits

Besides providing developers a single API to improve performance and compatibility, as mentioned before, Oboe also offers other benefits.

Android Developer Advocate, Don Turner, have listed some of them in the Android Developer blog:

  • Fast release process, bug fixes rolled out in days
  • Less guesswork, solutions for known audio bugs
  • Open source and maintained by Google engineers

Getting started with Oboe

You can start using Oboe by heading to the GitHub repository, once there you´ll have to copy the library to your computer.

A CMake configuration will be required, as it must be built as a sub-project of this toolset. In case you haven’t added any C and C++ code to your Android Studio project, you must do this first.   

Find out: What’s the difference between Android NDK and Android SDK?  

Once you have all this setup, you’ll only have to follow some steps like telling your project where the cloned repository is, then add it as a subdirectory and also add the public headers, and lastly, aggregate Oboe as a dependent library.

To finish off, index the library by clicking on the Refresh Linked C++ Projects option in the menu, and you´ll be now able to use Oboe in your project.

There is also an Oboe codelab you can take to build a simple musical game.

Certain projects have made use of Oboe or AAudio to improve their audio quality and performance, including Csound for Android, G-Stomper Studio, Music Speed Changer or FluidSynth, to name a few.

Finally, If you want to hear about Oboe at first hand, check out this detailed video where Turner introduces it as a tool to build high-performance audio on Android apps and provide a better user experience:

What do you think about Oboe? Does it sound like a great way to battle against high latency apps? Let us know in the comments!