Seperating the libraries from SoundSystem was a lot easier than I expected it to be (I think because I always had a sense when I was programming them that they were seperate entities from the core library). It really just required making a couple of big changes to the SoundSystemConfig class and several minor changes in other random classes.
I have decided to do a couple of things differently than before.
The first thing I'm going to do differently is that I am just going to call the library core class "SoundSystem" rather than "SoundSystemCore" (as mentioned before this will be the stripped-down customizable version). I will not post any equivalent of the old "full SoundSystem" class here. Rather, I will post only the core SoundSystem class, and the SoundSystemJPCT extention (since this is the jPCT forum, after all).
Another thing I changed today is that I combined the ICodec and IDecoder classes into a single ICodec class (made more sense because all that the ICodec was doing before was returning instances of IDecoder). The method for assigning a codec to a particular file type now works like this:
SoundSystemConfig.setCodec( "ogg", CodecJOrbis.class ); // takes a Class parameter, not an instance parameter any more
Internally, when SoundSystem needs to decode the audio data, it grabs an instance of the class using:
SoundSystemConfig.getCodec( "myfilename.ogg" );
Adding libraries now works in a similar manner:
SoundSystemConfig.addLibrary( LibraryLWJGLOpenAL.class );
I removed the old method for setting library priorities (this was used by SoundSystem's built-in compatibility checking). Now, the order you add the libraries using the above "addLibrary" method is the order SoundSystem will try to load them (if the first one fails, it tries the second one, etc).
I am also working to ensure that even though the SoundSystem core is stripped down and more flexible, it is still easy to use. I feel like I have been able to accomplish that. Here is an example - say you were using the SoundSystem core in a project. You wanted it to have support for .wav files only, and you wanted it to try OpenAL first, then JavaSound as a backup option. To do this, you would first link with the required jars:
SoundSystem.jar
LibraryLWJGLOpenAL.jar
LibraryJavaSound.jar
CodecWav.jar
(lwjgl.jar, jpct.jar, etc)
Then you would do a couple of extra steps in your program before instantiating the SoundSystem:
SoundSystemConfig.setCodec( "wav", CodecWav.class );
SoundSystemConfig.addLibrary( LibraryLWJGLOpenAL.class );
SoundSystemConfig.addLibrary( LibraryJavaSound.class );
SoundSystem soundSystem = new SoundSystem();
As you can see, it's still not too much of a hassle to use.
Anyway, most of the changes are going to be completely internal to SoundSystem, and as long as you use SoundSystemJPCT rather than the SoundSystem core by itself, your program is not likely to be affected at all by the change. The only change that may affect you is if you are using the SoundSystem.switchLibrary method. The reason this method has changed is that I have completely removed all the "global library identifiers" from the SoundSystemConfig class (for example, SoundSystemConfig.LIBRARY_JAVASOUND). All class methods that used to take one of these identifiers as a parameter will now take the library class as a parameter instead. Example:
mySoundSystem.switchLibrary( LibraryJavaSound.class );
I fell this is a very minor change, and it shouldn't take too much effort to fix anything that breaks because of it.
So far all of my tests have gone smoothly, so I should be ready to post a new release soon.