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; ...

Get Sams Teach Yourself Android Game Programming in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.