* Fixed issue where setReverbEnabled(false) after setPositional(false) did not actually remove reverb. Reverb is now removed automatically when setPositional(false) per contract of the method.

* Formatted the classes.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9569 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent 5497fcc7e6
commit 9d95528e21
  1. 6
      engine/src/core/com/jme3/audio/AudioNode.java
  2. 440
      engine/src/lwjgl/com/jme3/audio/lwjgl/LwjglAudioRenderer.java

@ -442,9 +442,10 @@ public class AudioNode extends Node {
*/ */
public void setReverbEnabled(boolean reverbEnabled) { public void setReverbEnabled(boolean reverbEnabled) {
this.reverbEnabled = reverbEnabled; this.reverbEnabled = reverbEnabled;
if (channel >= 0) if (channel >= 0) {
getRenderer().updateSourceParam(this, AudioParam.ReverbEnabled); getRenderer().updateSourceParam(this, AudioParam.ReverbEnabled);
} }
}
/** /**
* @return Filter for the reverberations of this audio node. * @return Filter for the reverberations of this audio node.
@ -642,9 +643,10 @@ public class AudioNode extends Node {
*/ */
public void setPositional(boolean positional) { public void setPositional(boolean positional) {
this.positional = positional; this.positional = positional;
if (channel >= 0) if (channel >= 0) {
getRenderer().updateSourceParam(this, AudioParam.IsPositional); getRenderer().updateSourceParam(this, AudioParam.IsPositional);
} }
}
@Override @Override
public void updateGeometricState(){ public void updateGeometricState(){

Loading…
Cancel
Save