public SoundPlayer() {
		
		try {
			SoundSystemConfig.setCodec("ogg", CodecJOrbis.class);
		} catch (SoundSystemException ex) {
			oggPlaybackSupport = false;
		}

		try {
			SoundSystemConfig.setCodec("wav", CodecWav.class);
		} catch (SoundSystemException ex) {
			wavPlaybackSupport = false;
		}


        boolean isOPenAL = Options.getAsBoolean(Options.OPEN_AL, Options.VALUE_TRUE);
        if (isOPenAL) {
            boolean aLCompatible = SoundSystem.libraryCompatible(LibraryLWJGLOpenAL.class);
            if (aLCompatible) {
                libraryType = LibraryLWJGLOpenAL.class; // OpenAL
            } else {
                libraryType = LibraryJavaSound.class; // Java Sound
            }
        } else {
            libraryType = LibraryJavaSound.class; // Java Sound
        }

		try {
			setSoundSystem(new SoundSystem(libraryType));
		} catch (SoundSystemException ex) {
			setSoundSystem(null);
		}
		
		if (getSoundSystem() != null) {
			getSoundSystem().setMasterVolume(volume);
			getSoundSystem().setVolume(BACKGROUND_TRACK, musicVolume);
		}
	}