The following code does not work under Linux when using the OpenJDK JRE.....it will play one sound effect, but then essentially "hangs" the thread, and no more sound effects can be played.
I am struggling to resolve this problem; essentially, it works on all other JRE's for Mac and Windows, but dies under OpenJDK...
The LineEvent
STOP gets fired and I call my stop() method to ready the Sound for playing again. It either dies within
setFramePosition() or
setMicrosecondPosition() from what I can discern:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| public void update(LineEvent e) { if (e.getType() == LineEvent.Type.STOP) { stop(); debug("Stopping Clip "+sfxURL.toString()); } }
public void stop() {
debug("stop() call for "+sfxURL.toString());
sfxClip.stop(); sfxClip.setFramePosition(0); sfxClip.setMicrosecondPosition(0); synchronized(sfxClip) { sfxClip.notifyAll(); }
} |
Anyone had this problem before, or any ideas on a way around...?
Thanks!
Pete (Red27).