O'Reilly logo

Sams Teach Yourself Android Game Programming in 24 Hours by Jonathan S. Harbour

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

Hour 14. Playing with the Audio System

What You’ll Learn in This Hour

• Playing audio using the media player component

• Adding audio files to the project

• Playing audio using the sound pool component

• Mixing audio samples in response to touch input events

In this hour you will learn to tap into the audio system of Android devices for playback of video game music and sound effects. The Android SDK supports the audio system by providing us with a class, SoundPool, that can load and play audio files through the integrated audio mixer. The Android SDK includes classes with methods for loading and playing multimedia content very easily. You will learn how to load audio assets and play them. Both music and sound effects files are treated the same; ...

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