O'Reilly logo

Beginning Java SE 6 Game Programming, Third Edition by Jonathan S. Harbour

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

Chapter 9. Sound Effects and Music

Java has a rich set of features for recording, mixing, and playing sound samples and MIDI sequences using a variety of classes that you will learn about in this chapter. You will learn about Java’s rich set of sound support classes for loading and playing audio files in a variety of formats through Java’s sound mixer. You will then learn about MIDI files and how to load and play them through Java’s MIDI sequencer.

Here is a rundown of the key topics in this chapter:

  • Loading and playing digital files

  • Loading and playing MIDI files

  • Writing some reusable audio classes

Playing Digital Sample Files

Java’s Sound API provides a package for working with digital sample files, which has methods for loading a sample file (AIFF, ...

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