/** * Start playing an instance of this audio. This method can be used * to play the same <code>AudioNode</code> multiple times. Note * that changes to the parameters of this AudioNode will not affect the * 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); }
@Override public void playSourceInstance(AudioSource as) { changeAudio(as); audioRenderer.playSourceInstance(as); }
/** * Start playing an instance of this audio. This method can be used * to play the same <code>AudioNode</code> multiple times. Note * that changes to the parameters of this AudioNode will not effect the * instances already playing. */ public void playInstance(){ getRenderer().playSourceInstance(this); }
/** * Start playing an instance of this audio. This method can be used * to play the same <code>AudioNode</code> multiple times. Note * that changes to the parameters of this AudioNode will not affect the * 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); }
private void changeAudio(AudioSource as) { if(as instanceof AudioNode) { AudioNode an = (AudioNode) as; an.setRefDistance(0.1f); an.setMaxDistance(1000f); } audioRenderer.playSourceInstance(as); }
@Override public void playInstance() { if(showRange) { updateRange(true); } AudioFactory.getInstance().getAudioRenderer().playSourceInstance(this); }