/** Stops all sound creation and closes all sound-related resources. */ public void stopCurrentSound() { if (midiSound != null) midiSound.stop(); if (functionSound != null) functionSound.pause(true); }