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
This commit is contained in:
parent
3678d4d4a3
commit
945683f432
@ -360,6 +360,7 @@ public class LwjglAudioRenderer implements AudioRenderer, Runnable {
|
|||||||
alSource3f(id, AL_POSITION, 0,0,0);
|
alSource3f(id, AL_POSITION, 0,0,0);
|
||||||
alSource3f(id, AL_VELOCITY, 0,0,0);
|
alSource3f(id, AL_VELOCITY, 0,0,0);
|
||||||
}else{
|
}else{
|
||||||
|
alSourcei(id, AL_SOURCE_RELATIVE, AL_FALSE);
|
||||||
updateSourceParam(src, AudioParam.Position);
|
updateSourceParam(src, AudioParam.Position);
|
||||||
updateSourceParam(src, AudioParam.Velocity);
|
updateSourceParam(src, AudioParam.Velocity);
|
||||||
updateSourceParam(src, AudioParam.MaxDistance);
|
updateSourceParam(src, AudioParam.MaxDistance);
|
||||||
@ -438,6 +439,7 @@ public class LwjglAudioRenderer implements AudioRenderer, Runnable {
|
|||||||
alSource3f(id, AL_VELOCITY, vel.x, vel.y, vel.z);
|
alSource3f(id, AL_VELOCITY, vel.x, vel.y, vel.z);
|
||||||
alSourcef(id, AL_MAX_DISTANCE, src.getMaxDistance());
|
alSourcef(id, AL_MAX_DISTANCE, src.getMaxDistance());
|
||||||
alSourcef(id, AL_REFERENCE_DISTANCE, src.getRefDistance());
|
alSourcef(id, AL_REFERENCE_DISTANCE, src.getRefDistance());
|
||||||
|
alSourcei(id, AL_SOURCE_RELATIVE, AL_FALSE);
|
||||||
|
|
||||||
if (src.isReverbEnabled()){
|
if (src.isReverbEnabled()){
|
||||||
int filter = EFX10.AL_FILTER_NULL;
|
int filter = EFX10.AL_FILTER_NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user