O'Reilly logo

Mastering LibGDX Game Development by Patrick Hoey

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

Sound and music

The first item to note for this section is how the audio resources are managed within the LibGDX framework. As explained in the previous chapters, the implementation of the Application interface for the desktop is LwjglApplication, which is part of the LibGDX backend package called LWJGL (com.badlogic.gdx.backends.lwjgl). LWJGL not only includes OpenGL support for graphics, but also audio support via OpenAL.

OpenAL was developed with a 3D environment in mind, and so velocity, position, direction, and intensity are all parameters supported by this API. These parameters allow more naturally sounding audio as the player moves through their environment. Under the covers, the actual audio buffers contain audio data in raw PCM format, ...

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