Sound System, Bug Fixes and AdditionsJAR:http://www.paulscode.com/libs/SoundSystem/14SEP2008/SoundSystem.jarSource Code:http://www.paulscode.com/source/SoundSystem/14SEP2008/SoundSystemSource.zipJavaDoc:LINK NO LONGER EXISTS
Test Applet:LINK NO LONGER EXISTS
Resources JAR: (only required when playing MIDI from an applet)
http://www.paulscode.com/libs/SoundSystem/SoundSystemResources.jarRather than waiting until I finish fixing SoundManager, I decided to go ahead and post the current version of SoundSystem, since there have been a couple of important bug fixes:
1) The main bug fix is that I was not calling each source's "positionChanged()" method when the listener moved or changed orientation, so "distanceFromListener" was not being updated. There was no noticable problem in OpenAL when using rolloff-attenuation (because the gain is set internally by OpenAL in that case). The bug was apparent in linear attenuation under OpenAL and in both attenuation models under JavaSound. In JavaSound, this bug also caused panning to not update when the listener orientation changed.
2) The minor bug fix is that I had the default listener orientation set to (0, 0, 1, 0, 1, 0) instead of (0, 0, -1, 0, 1, 0), because I did not realize that OpenAL considered "-z" to be "forward" and "z" to be "reverse". So in other words, the listener by default was facing the wrong direction (toward the player) instead of facing forward. This explains why Egon was able to use jPCT coordinates for sources in his "Nameless Bomberman Clone" game without noticing any problems (although technically coordinates were backwards and upside down, but you can't hear the difference between that and facing the correct direction, when playing on normal stereo speakers).
Another major update in this version is the ability to change each source's volume, and there is also a master volume which affects all sources. I think this is an important addition to the library, since most games have configuration menus which allows the player to manually change the volume, turn down or mute the music, etc.
-- EDIT --
One more new thing in this version is the ability to play back MIDI. Playback of other sources is a bit choppy when MIDI is playing while the JavaSound library is being used, but simultaneous MIDI and other sources both play smoothly under OpenAL. I have no intention of working on MIDI any time soon, so it is available "as is" for now.
-- EDIT #2 --
Another bug that is fixed in this version is the regular expression for SoundSystemConfig.PREFIX_URL. Before, I had accidentaly typed in an extra
[tT] (i.e. using the expression would search for "htttp://" instead of "http://").