Book Image

Learning LibGDX Game Development

Book Image

Learning LibGDX Game Development

Overview of this book

Table of Contents (21 chapters)
Learning LibGDX Game Development Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using sound generators


Until now, you learned about direct access to the audio device in LibGDX, and you now know how to write audio samples to it. Sure enough, you could now (try to) write your own sound generator class from here and feed one of LibGDX's audio device instances with the resulting audio samples. However, audio programming is beyond the scope of this book, and it is also a very advanced topic even for seasoned programmers.

A viable solution to get hold of some nice sound effects is to use one of the existing sound generators, which are free and open source. One of these sound generators is sfxr, which was originally developed by Tomas "DrPetter" Pettersson in 2007. Over the time, several sfxr variants, such as bfxr, cfxr, and as3sfxr, have emerged.

The sfxr generator

The sfxr sound generator quickly became widespread among independent game developers everywhere because it simplified the creation of new sounds just by clicking on the RANDOMIZE button. Naturally, all other parameters...