1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| 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); } |