Example usage for javax.sound.sampled Mixer isOpen

List of usage examples for javax.sound.sampled Mixer isOpen

Introduction

In this page you can find the example usage for javax.sound.sampled Mixer isOpen.

Prototype

boolean isOpen();

Source Link

Document

Indicates whether the line is open, meaning that it has reserved system resources and is operational, although it might not currently be playing or capturing sound.

Usage

From source file:SoundManagerTest.java

/**
 * Does any clean up before closing.//w  ww.  ja v a 2 s.  co  m
 */
protected void cleanUp() {
    // signal to unpause
    setPaused(false);

    // close the mixer (stops any running sounds)
    Mixer mixer = AudioSystem.getMixer(null);
    if (mixer.isOpen()) {
        mixer.close();
    }
}