private void applySourcePositionalState(int sourceId, AudioSource src) {
        if (src.isPositional()) {
            // Play in world space: absolute position/velocity
            Vector3f pos = src.getPosition();
            Vector3f vel = src.getVelocity();
            al.alSource3f(sourceId, AL_POSITION, pos.x, pos.y, pos.z);
            al.alSource3f(sourceId, AL_VELOCITY, vel.x, vel.y, vel.z);
            al.alSourcef(sourceId, AL_REFERENCE_DISTANCE, src.getRefDistance());
            al.alSourcef(sourceId, AL_MAX_DISTANCE, src.getMaxDistance());
            al.alSourcei(sourceId, AL_SOURCE_RELATIVE, AL_FALSE);

            if (supportEfx) {
                if (!src.isReverbEnabled()) {
                    al.alSource3i(sourceId, EFX.AL_AUXILIARY_SEND_FILTER, 0, 0, EFX.AL_FILTER_NULL);
                } else {
                    applySourceReverbFilter(sourceId, src);
                }
            }
        } else {
            // Play in headspace: relative to listener, fixed position/velocity
            al.alSource3f(sourceId, AL_POSITION, 0, 0, 0);
            al.alSource3f(sourceId, AL_VELOCITY, 0, 0, 0);
            al.alSourcei(sourceId, AL_SOURCE_RELATIVE, AL_TRUE);

            // Disable reverb send for non-positional sounds
            if (supportEfx) {
                al.alSource3i(sourceId, EFX.AL_AUXILIARY_SEND_FILTER, 0, 0, EFX.AL_FILTER_NULL);
            }
        }
    }
Sets AL_SOURCE_RELATIVE and applies position/velocity/distance accordingly
jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java