public static void init() {
try {
SoundSystemConfig.addLibrary(LibraryLWJGLOpenAL.class);
SoundSystemConfig.addLibrary(LibraryJavaSound.class);
SoundSystemConfig.setCodec("ogg", CodecJOgg.class);
SoundSystemConfig.setCodec("wav", CodecWav.class);
} catch (SoundSystemException e) {
System.err.println("Error linking with the plug-ins");
}
ss = new SoundSystem();
ss.newStreamingSource(true, "music0", "music0.ogg", true, 0, 0, 0,
SoundSystemConfig.ATTENUATION_NONE, 0);
ss.newStreamingSource(true, "music1", "music1.ogg", true, 0, 0, 0,
SoundSystemConfig.ATTENUATION_NONE, 0);
ss.newStreamingSource(true, "music2", "music2.ogg", true, 0, 0, 0,
SoundSystemConfig.ATTENUATION_NONE, 0);
ss.setMasterVolume(0.0f);
}
Here’s the code I have to initialize the sound system. I tried setting master volume to 0 then what it’s supposed to be after loading is complete but I still have issues. On top of that even though the sound runs fine in Eclipse it doesn’t in the exported JAR