public void playPause() { if (clip != null) { if (playState == PLAYING) { clip.stop(); playState = PAUSED; } } }
public void playStop() { if (clip != null) { if (playState == PLAYING || playState == PAUSED) { clip.stop(); clip.close(); playState = STOPPED; } } }