O'Reilly logo

Mastering Android Game Development by Raul Portales

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

Sound FX

Sound effects will be used for events in the game such as explosions, firing bullets, and so on, but also could be used in other cases such as menu clicks and dialogs appearing. In our game we will add sound effects to the explosions of the asteroids and the spaceship as well as for laser firing.

We will begin discussing some ways to get sound effects for games. We cannot work if we don't have sound files, right?

Once we have our sounds in place, we will update GameEngine to provide a way to signal events in the game, and we will let SoundManager know when one of those events happens.

Finally we will explain how SoundPool works and how to include it in our SoundManager, associating a game event to a sound effect.

Hands on—let's get some ...

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