Class Device


  • public final class Device
    extends Object
    This class provides a handle to a specific audio device.
    Author:
    Athomas Goldberg, Sven Gothel, et al.
    • Constructor Detail

      • Device

        public Device​(String deviceName)
        Create a new device by open()'ing the named audio device.
        Parameters:
        deviceName - The specified device name, null for default.
    • Method Detail

      • getName

        public String getName()
        Returns the device name.
      • isValid

        public boolean isValid()
        Returns whether getALDevice() is open and valid, i.e. not null, e.g. not close().
      • open

        public boolean open()
        Opens the device if not yet opened
        Returns:
        true if already open or newly opened
        See Also:
        isValid(), Object.clone()
      • close

        public void close()
        closes the device, freeing its resources.