To play audio in your game, Panda3D can offer you the following three choices of audio libraries:
- FMOD: this is a very capable multi-platform sound engine. FMOD supports various types of sound files - MP3, WAV, AIFF, MIDI, MOD, WMA, OGG Vorbis.
There is only one drawback: the license restricts you from using it for commercial purposes, unless you actually buy yourself an FMOD license. But if your program is not intended to make any money, and is not charged for in any way, then you may use FMOD in it for free.
- OpenAL: this is a well-known and popular open-source audio library, also supported by Panda3D. Although it runs on windows without problems, panda's support for OpenAL is not yet stable on linux. If you are experiencing crashes you might want to consider switching to fmod, or using a different library like pyOpenAL.
- Miles: this sound system is not included (yet) in the downloadable binaries of Panda3D, in order to use this you will need to compile Panda3D from scratch using the ppremake system.
If these choices are not enough for you, you can always try other non-builtin sound libraries such as Pygame, or PyOpenAL.
To configure Panda3D to use a specific sound system, you will need to change your Config.prc configuration. You should look up the variable audio-library-name and change the value to one of libp3openal_audio , libp3fmod_audio , or libmiles_audio . (The names of the libraries may differ with the way Panda3D was built.)
If you don't want to use FMOD (due to the license) in your program, remove the fmod.dll and libp3fmod_audio.dll files from the panda \bin folder.
Note: If you are using FMOD and are using 64-bits, you might run into a strange assertion error or even a crash if the memory address of the sound exceeds the 4 billion. This is because of a bug in FMOD, until that bug is fixed you'll just need to make sure your memory usage doesn't exceed the 4GB (which is not likely, and even impossible on 32-bits systems).
|