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

Summary

In this chapter, we saw how to create and realize an OpenSL ES engine connected to an output channel. We played music from an encoded file and saw that an encoded file cannot be loaded in a buffer.

We also played sound buffers in a sound queue. Buffers can either be appended to a queue, in which case they are played with delay, or inserted in replacement of previous sounds, in which case they are played immediately. Finally, we have recorded sound in buffers and played them back.

Should you prefer OpenSL ES over Java APIs? There is no definite answer. Devices evolve at much quieter pace than Android itself. So if your application aims at a large compatibility, that is, Android 2.2 or less, Java APIs are the only solution. On the other hand, ...

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