My problem is that I don't know how to play play the same clip many times simultaneously...
If an event in the game happens two times I must play the same clip two times.
This is the code I use now:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| if(!soundOn) return true; Clip snd=getSound(name); if(snd==null){ Debug.err("! SoundBank.playSound() Sound '"+name+"' not present!"); return false; } if(snd.isRunning()){ snd.stop(); } snd.setMicrosecondPosition(0); snd.start(); |
Infact I should not stop the sound, but run another
"instance"...
Any idea?