Abstractualizing Paulscode?

So, while working on MERCury, I decided I need to move to a better sound system than TinySound. I decided to use pualscode’s 3d sound system (it can be 2d!). But since it is an engine, I need to wrap around it with an class: Sound. So I initialized the sound system successfully:

Starting up SoundSystem...
Initializing LWJGL OpenAL
    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
OpenAL initialized.

Then I make a sound:

			Sound s = Sound.loadSound("res/j.ogg", false, 0, 0);

Sound’s load() and play() methods:

	public void play() {

	public static Sound loadSound(String location, boolean loop, float x, float y) throws FileNotFoundException {
		if (!new File(location).exists())
			throw new FileNotFoundException("No '" + location + "' exists!");

		try {
			Runner.getInstance().soundSystem().loadSound(new URL(location), String.valueOf(Sound.crnt_src));
		} catch (MalformedURLException e) {

		Sound result = new Sound(String.valueOf(crnt_src));
		return result;

I probably am doing something super n00bish… I am new completely to sound. What little experience I do have is from slick2d, and that has nothing to do with this!


I would tell you, but then I would have to kill you. :-X

I wouldn’t have the loop and position in the load method. Rather, put them in the play method. Also, what’s wrong with tiny sound? It is a good library.


Paul Lamb Sound library doesn’t need to be “abstractized”, it’s already high level enough in my humble opinion. If you need to implement the Doppler effect, rather contribute to this library.

It doesn’t support OpenAL and I’m not sure it works under Android.