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);
			s.play();

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

	public void play() {
		Runner.getInstance().soundSystem().play(source);
	}

	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) {
			e.printStackTrace();
		}

		Sound result = new Sound(String.valueOf(crnt_src));
		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!

Thanks!

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.

Hi

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.