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