Search in sources :

Example 1 with StreamingSound

use of org.terasology.audio.StreamingSound 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 : FloatBuffer(java.nio.FloatBuffer) AudioConfig(org.terasology.config.AudioConfig) LoggerFactory(org.slf4j.LoggerFactory) AL(org.lwjgl.openal.AL) StaticSoundData(org.terasology.audio.StaticSoundData) Vector3f(org.terasology.math.geom.Vector3f) LWJGLException(org.lwjgl.LWJGLException) ALC11(org.lwjgl.openal.ALC11) StreamingSoundData(org.terasology.audio.StreamingSoundData) OpenALStreamingSound(org.terasology.audio.openAL.streamingSound.OpenALStreamingSound) ALC10(org.lwjgl.openal.ALC10) OpenALStreamingSoundPool(org.terasology.audio.openAL.streamingSound.OpenALStreamingSoundPool) OpenALSound(org.terasology.audio.openAL.staticSound.OpenALSound) IntBuffer(java.nio.IntBuffer) Sound(org.terasology.audio.Sound) Map(java.util.Map) ALCcontext(org.lwjgl.openal.ALCcontext) Logger(org.slf4j.Logger) AudioManager(org.terasology.audio.AudioManager) StaticSound(org.terasology.audio.StaticSound) Iterator(java.util.Iterator) StreamingSound(org.terasology.audio.StreamingSound) AssetFactory(org.terasology.assets.AssetFactory) OpenALSoundPool(org.terasology.audio.openAL.staticSound.OpenALSoundPool) AL10(org.lwjgl.openal.AL10) Maps(com.google.common.collect.Maps) Direction(org.terasology.math.Direction) BufferUtils(org.lwjgl.BufferUtils) Quat4f(org.terasology.math.geom.Quat4f) PropertyChangeListener(java.beans.PropertyChangeListener) ALCdevice(org.lwjgl.openal.ALCdevice) AudioEndListener(org.terasology.audio.AudioEndListener) AudioEndListener(org.terasology.audio.AudioEndListener)

Aggregations

Maps (com.google.common.collect.Maps)1 PropertyChangeListener (java.beans.PropertyChangeListener)1 FloatBuffer (java.nio.FloatBuffer)1 IntBuffer (java.nio.IntBuffer)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 BufferUtils (org.lwjgl.BufferUtils)1 LWJGLException (org.lwjgl.LWJGLException)1 AL (org.lwjgl.openal.AL)1 AL10 (org.lwjgl.openal.AL10)1 ALC10 (org.lwjgl.openal.ALC10)1 ALC11 (org.lwjgl.openal.ALC11)1 ALCcontext (org.lwjgl.openal.ALCcontext)1 ALCdevice (org.lwjgl.openal.ALCdevice)1 Logger (org.slf4j.Logger)1 LoggerFactory (org.slf4j.LoggerFactory)1 AssetFactory (org.terasology.assets.AssetFactory)1 AudioEndListener (org.terasology.audio.AudioEndListener)1 AudioManager (org.terasology.audio.AudioManager)1 Sound (org.terasology.audio.Sound)1