Book Image

iOS Game Programming Cookbook

Book Image

iOS Game Programming Cookbook

Overview of this book

Table of Contents (19 chapters)
iOS Game Programming Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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 the starter kit for this chapter.

Getting ready

Before starting with the technical ways of integrating music and sound effects in the game, we should have an understanding of how audio is added in videos, movies, or wherever audio is required. In a game...