* Fix issue 551

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9986 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 12 years ago
parent be59bd91fb
commit 7dae4d5238
  1. 7
      engine/src/core/com/jme3/audio/AudioNode.java

@ -186,6 +186,9 @@ public class AudioNode extends Node {
* Start playing the audio.
*/
public void play(){
if (positional && data.getChannels() > 1) {
throw new IllegalStateException("Only mono audio is supported for positional audio nodes");
}
getRenderer().playSource(this);
}
@ -196,6 +199,9 @@ public class AudioNode extends Node {
* instances already playing.
*/
public void playInstance(){
if (positional && data.getChannels() > 1) {
throw new IllegalStateException("Only mono audio is supported for positional audio nodes");
}
getRenderer().playSourceInstance(this);
}
@ -392,7 +398,6 @@ public class AudioNode extends Node {
this.timeOffset = timeOffset;
if (data instanceof AudioStream) {
System.out.println("request setTime");
((AudioStream) data).setTime(timeOffset);
}else if(status == Status.Playing){
stop();

Loading…
Cancel
Save