From 945683f432d4112c78421d8893e9e1416b20dab5 Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Sun, 15 May 2011 04:57:54 +0000 Subject: [PATCH] Fixed positional audio to actually be positional. Prior to this change, all positional audio was relative to the listener. So no amount of moving around or turning of the head was going to make the sound any different. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7494 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/lwjgl-oal/com/jme3/audio/lwjgl/LwjglAudioRenderer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/src/lwjgl-oal/com/jme3/audio/lwjgl/LwjglAudioRenderer.java b/engine/src/lwjgl-oal/com/jme3/audio/lwjgl/LwjglAudioRenderer.java index 894b2e973..1c69fa737 100644 --- a/engine/src/lwjgl-oal/com/jme3/audio/lwjgl/LwjglAudioRenderer.java +++ b/engine/src/lwjgl-oal/com/jme3/audio/lwjgl/LwjglAudioRenderer.java @@ -360,6 +360,7 @@ public class LwjglAudioRenderer implements AudioRenderer, Runnable { alSource3f(id, AL_POSITION, 0,0,0); alSource3f(id, AL_VELOCITY, 0,0,0); }else{ + alSourcei(id, AL_SOURCE_RELATIVE, AL_FALSE); updateSourceParam(src, AudioParam.Position); updateSourceParam(src, AudioParam.Velocity); updateSourceParam(src, AudioParam.MaxDistance); @@ -438,6 +439,7 @@ public class LwjglAudioRenderer implements AudioRenderer, Runnable { alSource3f(id, AL_VELOCITY, vel.x, vel.y, vel.z); alSourcef(id, AL_MAX_DISTANCE, src.getMaxDistance()); alSourcef(id, AL_REFERENCE_DISTANCE, src.getRefDistance()); + alSourcei(id, AL_SOURCE_RELATIVE, AL_FALSE); if (src.isReverbEnabled()){ int filter = EFX10.AL_FILTER_NULL;