* Fix issue 551
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9986 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
@@ -186,6 +186,9 @@ public class AudioNode extends Node {
|
|||||||
* Start playing the audio.
|
* Start playing the audio.
|
||||||
*/
|
*/
|
||||||
public void play(){
|
public void play(){
|
||||||
|
if (positional && data.getChannels() > 1) {
|
||||||
|
throw new IllegalStateException("Only mono audio is supported for positional audio nodes");
|
||||||
|
}
|
||||||
getRenderer().playSource(this);
|
getRenderer().playSource(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,6 +199,9 @@ public class AudioNode extends Node {
|
|||||||
* instances already playing.
|
* instances already playing.
|
||||||
*/
|
*/
|
||||||
public void playInstance(){
|
public void playInstance(){
|
||||||
|
if (positional && data.getChannels() > 1) {
|
||||||
|
throw new IllegalStateException("Only mono audio is supported for positional audio nodes");
|
||||||
|
}
|
||||||
getRenderer().playSourceInstance(this);
|
getRenderer().playSourceInstance(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,7 +398,6 @@ public class AudioNode extends Node {
|
|||||||
|
|
||||||
this.timeOffset = timeOffset;
|
this.timeOffset = timeOffset;
|
||||||
if (data instanceof AudioStream) {
|
if (data instanceof AudioStream) {
|
||||||
System.out.println("request setTime");
|
|
||||||
((AudioStream) data).setTime(timeOffset);
|
((AudioStream) data).setTime(timeOffset);
|
||||||
}else if(status == Status.Playing){
|
}else if(status == Status.Playing){
|
||||||
stop();
|
stop();
|
||||||
|
|||||||
Reference in New Issue
Block a user