private void applySourceLooping(int sourceId, AudioSource src, boolean forceNonLoop) {
        boolean looping = !forceNonLoop && src.isLooping();
        // Streams handle looping internally by rewinding, not via AL_LOOPING.
        if (src.getAudioData() instanceof AudioStream) {
            looping = false;
        }
        al.alSourcei(sourceId, AL_LOOPING, looping ? AL_TRUE : AL_FALSE);
    }
Applies all parameters from the AudioSource to the specified OpenAL source ID.
Used when initially playing a source or instance.

@param sourceId     The OpenAL source ID.
@param src          The jME AudioSource.
@param forceNonLoop If true, looping will be disabled regardless of source setting (used for instances).
jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java