O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Playing Sound with OpenSL ES

Multimedia is not only about graphics; it is also about sound and music. Applications in this domain are among the most popular in the Android market. Indeed, music has always been a strong engine for mobile devices sales and music lovers are a target of choice. This is why an OS like Android could probably not go far without some musical talent!

When talking about sound on Android, we should distinguish Java from the native world. Indeed, both sides feature completely different APIs: MediaPlayer, SoundPool, AudioTrack, and JetPlayer on one hand, Open SL for Embedded Systems (also abbreviated OpenSL ES) on the other hand:

  • MediaPlayer is more high-level and easy to use. It handles not only music but also video. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required