don't use deprecated AudioNode constructor

cleanup_build_scripts
Kirill Vainer 9 years ago
parent a1fd3ff3d9
commit d1b866735a
  1. 5
      jme3-examples/src/main/java/jme3test/audio/TestOgg.java

@ -33,6 +33,7 @@
package jme3test.audio;
import com.jme3.app.SimpleApplication;
import com.jme3.audio.AudioData.DataType;
import com.jme3.audio.AudioNode;
import com.jme3.audio.AudioSource;
import com.jme3.audio.LowPassFilter;
@ -49,7 +50,7 @@ public class TestOgg extends SimpleApplication {
@Override
public void simpleInitApp(){
System.out.println("Playing without filter");
audioSource = new AudioNode(assetManager, "Sound/Effects/Foot steps.ogg", true);
audioSource = new AudioNode(assetManager, "Sound/Effects/Foot steps.ogg", DataType.Buffer);
audioSource.play();
}
@ -59,7 +60,7 @@ public class TestOgg extends SimpleApplication {
audioRenderer.deleteAudioData(audioSource.getAudioData());
System.out.println("Playing with low pass filter");
audioSource = new AudioNode(assetManager, "Sound/Effects/Foot steps.ogg", true);
audioSource = new AudioNode(assetManager, "Sound/Effects/Foot steps.ogg", DataType.Buffer);
audioSource.setDryFilter(new LowPassFilter(1f, .1f));
audioSource.setVolume(3);
audioSource.play();

Loading…
Cancel
Save