* Fix issue 551
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9986 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
be59bd91fb
commit
7dae4d5238
@ -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…
x
Reference in New Issue
Block a user