O'Reilly logo

iOS Game Programming Cookbook by Bhanu Birani, Chhavi Vaishnav

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

Adding music to games

No video or movie is complete without music and neither is a game. Our end goal in this topic is to integrate some smoothing and awesome sound effects to make it look like a complete game that can be enjoyed by the user. So, in iOS development, there are many ways to integrate and play audio in an app or in a game. Some are system sound services, AVAudioPlayer, audio queue services, and OpenAL. All are used for some or the other purpose and utility in an app.

In this recipe, we will be discussing different ways of integrating music and sound effects provided by iOS. And in the upcoming section, we will integrate background music and some sound effects at specific events happening in our FlyingSpaceship game, which will be ...

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