Example #1
0
  /**
   * Pauses/resumes current sound.
   *
   * @param doResume : true = resume play, false = pause
   */
  public void pauseResumeSound(boolean doResume) {

    if (currentSoundType == SOUNDTYPE_MIDI && midiSound != null) {
      midiSound.pause(!doResume);
    }

    if (currentSoundType == SOUNDTYPE_FUNCTION && functionSound != null)
      functionSound.pause(!doResume);

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