Search in sources :

Example 1 with OpenALManager

use of org.terasology.audio.openAL.OpenALManager in project Terasology by MovingBlocks.

the class LwjglAudio method initialise.

@Override
public void initialise(GameEngine engine, Context rootContext) {
    Config config = rootContext.get(Config.class);
    try {
        audioManager = new OpenALManager(config.getAudio());
    } catch (LWJGLException | OpenALException e) {
        logger.warn("Could not load OpenAL manager - sound is disabled", e);
        audioManager = new NullAudioManager();
    }
    rootContext.put(AudioManager.class, audioManager);
}
Also used : OpenALManager(org.terasology.audio.openAL.OpenALManager) Config(org.terasology.config.Config) NullAudioManager(org.terasology.audio.nullAudio.NullAudioManager) LWJGLException(org.lwjgl.LWJGLException) OpenALException(org.lwjgl.openal.OpenALException)

Aggregations

LWJGLException (org.lwjgl.LWJGLException)1 OpenALException (org.lwjgl.openal.OpenALException)1 NullAudioManager (org.terasology.audio.nullAudio.NullAudioManager)1 OpenALManager (org.terasology.audio.openAL.OpenALManager)1 Config (org.terasology.config.Config)1