Search in sources :

Example 1 with AudioEndListener

use of org.terasology.engine.audio.AudioEndListener in project Terasology by MovingBlocks.

the class OpenALManager method loopMusic.

@Override
public void loopMusic(StreamingSound music, float volume) {
    AudioEndListener loopingEndListener = interrupted -> {
        if (!interrupted) {
            loopMusic(music, volume);
        }
    };
    playMusic(music, volume, loopingEndListener);
}
Also used : ALCapabilities(org.lwjgl.openal.ALCapabilities) FloatBuffer(java.nio.FloatBuffer) LoggerFactory(org.slf4j.LoggerFactory) AL(org.lwjgl.openal.AL) OpenALStreamingSoundPool(org.terasology.engine.audio.openAL.streamingSound.OpenALStreamingSoundPool) ALC11(org.lwjgl.openal.ALC11) ALC10(org.lwjgl.openal.ALC10) StaticSound(org.terasology.engine.audio.StaticSound) StreamingSound(org.terasology.engine.audio.StreamingSound) StreamingSoundData(org.terasology.engine.audio.StreamingSoundData) Map(java.util.Map) Vector3f(org.joml.Vector3f) OpenALStreamingSound(org.terasology.engine.audio.openAL.streamingSound.OpenALStreamingSound) Quaternionfc(org.joml.Quaternionfc) OpenALSound(org.terasology.engine.audio.openAL.staticSound.OpenALSound) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) AssetFactory(org.terasology.gestalt.assets.AssetFactory) AudioManager(org.terasology.engine.audio.AudioManager) AL10(org.lwjgl.openal.AL10) Maps(com.google.common.collect.Maps) ALC(org.lwjgl.openal.ALC) Direction(org.terasology.engine.math.Direction) BufferUtils(org.lwjgl.BufferUtils) Sound(org.terasology.engine.audio.Sound) StaticSoundData(org.terasology.engine.audio.StaticSoundData) ALCCapabilities(org.lwjgl.openal.ALCCapabilities) Vector3fc(org.joml.Vector3fc) OpenALSoundPool(org.terasology.engine.audio.openAL.staticSound.OpenALSoundPool) AudioEndListener(org.terasology.engine.audio.AudioEndListener) AudioConfig(org.terasology.engine.config.AudioConfig) AudioEndListener(org.terasology.engine.audio.AudioEndListener)

Aggregations

Maps (com.google.common.collect.Maps)1 FloatBuffer (java.nio.FloatBuffer)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 Quaternionfc (org.joml.Quaternionfc)1 Vector3f (org.joml.Vector3f)1 Vector3fc (org.joml.Vector3fc)1 BufferUtils (org.lwjgl.BufferUtils)1 AL (org.lwjgl.openal.AL)1 AL10 (org.lwjgl.openal.AL10)1 ALC (org.lwjgl.openal.ALC)1 ALC10 (org.lwjgl.openal.ALC10)1 ALC11 (org.lwjgl.openal.ALC11)1 ALCCapabilities (org.lwjgl.openal.ALCCapabilities)1 ALCapabilities (org.lwjgl.openal.ALCapabilities)1 Logger (org.slf4j.Logger)1 LoggerFactory (org.slf4j.LoggerFactory)1 AudioEndListener (org.terasology.engine.audio.AudioEndListener)1 AudioManager (org.terasology.engine.audio.AudioManager)1 Sound (org.terasology.engine.audio.Sound)1