The first thing we'll do is add some background music to our game. Before we do, though, let's talk a little about audio in Panda3D.
The audio system in Panda3D is not the strongest feature of the engine. There are numerous ways to load audio files, and several of the commands can be quite confusing. Even so, it's pretty easy to get the hang of using it. To start with, we'll talk about the two pieces of the audio system:
AudioSoundObjects: Objects that contain individual sounds
AudioManagerObjects: Objects that group multiple sounds together
AudioSound is the class that contains a specific sound file. An instance of this class is returned when a sound file is loaded. That's really all there is to it. Here are the ...