Summary

In this chapter, we have learned how to use Libgdx's four audio interfaces, Sound, Music, AudioDevice, and AudioRecorder, and about their specific use cases. We have taken a look at freely available and open source sound generators and used one of them to create sound effects that can be used in Canyon Bunny. We have also added background music to the game and understood that Libgdx takes care of when a music instance being played needs to be paused and resumed in terms of the Life-Cycle in a Libgdx application. A manager class called AudioManager has been created to gain centralized control over any audio-related actions. Finally, playing music and sounds turned out to be a very straightforward process in conjunction with the use of our ...

Get Learning Libgdx Game Development 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.