Search in sources :

Example 1 with NullAudioManager

use of org.terasology.audio.nullAudio.NullAudioManager 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)

Example 2 with NullAudioManager

use of org.terasology.audio.nullAudio.NullAudioManager in project Terasology by MovingBlocks.

the class HeadlessEnvironment method setupAudio.

@Override
protected void setupAudio() {
    NullAudioManager audioManager = new NullAudioManager();
    context.put(AudioManager.class, audioManager);
}
Also used : NullAudioManager(org.terasology.audio.nullAudio.NullAudioManager)

Example 3 with NullAudioManager

use of org.terasology.audio.nullAudio.NullAudioManager in project Terasology by MovingBlocks.

the class HeadlessAudio method initNoSound.

private void initNoSound(Context context) {
    audioManager = new NullAudioManager();
    context.put(AudioManager.class, audioManager);
}
Also used : NullAudioManager(org.terasology.audio.nullAudio.NullAudioManager)

Aggregations

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