See: Description
| Class | Description |
|---|---|
| OggVorbisDecoderFactory |
Rewritten from the JCraft JOrbisPlayer example (GPLv2+), fixing a
bunch of bugs that prevent it from playing short files and recasting
into a read()-driven AudioInputStream form.
|
| OggVorbisDecoderFactory.OggStream |
Core JOgg/JOrbis magic handled here.
|
| OggVorbisDecoderFactory.OggVorbisAudioInputStream |
The AudioInputStream extension to handle decoding Ogg/Vorbis Audio
input.
|
| Playlist |
Represent a set of sounds that will be presented to a SoundPlayer in a
certain order as defined by the Playlists playmodes.
|
| SoundPlayer |
Stripped down class for playing sound.
|
FreeCol initializes the libraries and Canvas initializes the players. Pointers to the library-objects and player-objects are stored in most of the GUI-classes.
This is the method for playing sounds (provided you have got access to the pointers):
if (sfxPlayer != null) {
sfxPlayer.play(sfxLibrary.get(sfxLibrary.ILLEGAL_MOVE));
}
if (musicPlayer != null) {
musicPlayer.play(musicLibrary.get(musicLibrary.INTRO));
}
Notice the if-statement checking wether or not the sfxPlayer-object is null. Beeing null indicates that sound is disabled.