- removed deprecated usage of audioRenderer in soundTrack

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8434 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 13 years ago
parent 319ccc62b4
commit d4c69da2a1
  1. 16
      engine/src/core/com/jme3/cinematic/events/SoundTrack.java

@ -49,8 +49,7 @@ import java.io.IOException;
public class SoundTrack extends AbstractCinematicEvent {
protected String path;
protected AudioNode audioNode;
protected AudioRenderer audioRenderer;
protected AudioNode audioNode;
protected boolean stream = false;
/**
@ -108,26 +107,27 @@ public class SoundTrack extends AbstractCinematicEvent {
}
@Override
public void initEvent(Application app, Cinematic cinematic) {
audioRenderer = app.getAudioRenderer();
audioNode = new AudioNode(audioRenderer, app.getAssetManager(), path, stream);
public void initEvent(Application app, Cinematic cinematic) {
audioNode = new AudioNode(app.getAssetManager(), path, stream);
setLoopMode(loopMode);
}
@Override
public void onPlay() {
audioRenderer.playSource(audioNode);
audioNode.play();
}
@Override
public void onStop() {
audioRenderer.stopSource(audioNode);
audioNode.stop();
}
@Override
public void onPause() {
audioRenderer.pauseSource(audioNode);
audioNode.pause();
}
@Override

Loading…
Cancel
Save