Class Devices

  • Direct Known Subclasses:
    CaptureDevices, PlaybackDevices

    public abstract class Devices
    extends Object
    Manages the list of active (currently plugged-in) capture/notify/playback devices and manages user preferences between all known devices (previously and actually plugged-in).
    Author:
    Vincent Lucas, Lyubomir Marinov
    • Constructor Detail

      • Devices

        public Devices​(AudioSystem audioSystem)
        Initializes the device list management.
        Parameters:
        audioSystem - The audio system managing this device list.
    • Method Detail

      • getDevice

        public CaptureDeviceInfo2 getDevice​(javax.media.MediaLocator locator)
        Gets a CapatureDeviceInfo2 which is known to this instance and is identified by a specific MediaLocator.
        Parameters:
        locator - the MediaLocator of the CaptureDeviceInfo2 to be returned
        Returns:
        a CaptureDeviceInfo2 which is known to this instance and is identified by the specified locator
      • getDevices

        public List<CaptureDeviceInfo2> getDevices()
        Returns the list of the CaptureDeviceInfo2s which are active/plugged-in.
        Returns:
        the list of the CaptureDeviceInfo2s which are active/plugged-in
      • getPropDevice

        protected abstract String getPropDevice()
        Returns the property of the capture devices.
        Returns:
        The property of the capture devices.
      • getSelectedDevice

        public CaptureDeviceInfo2 getSelectedDevice​(List<CaptureDeviceInfo2> activeDevices)
        Gets the selected active device.
        Parameters:
        activeDevices - the list of the active devices
        Returns:
        the selected active device
      • setDevice

        public void setDevice​(CaptureDeviceInfo2 device,
                              boolean save)
        Selects the active device.
        Parameters:
        device - the selected active device
        save - true to save the choice in the configuration; false, otherwise
      • setDevices

        public void setDevices​(List<CaptureDeviceInfo2> devices)
        Sets the list of CaptureDeviceInfo2s which are active/plugged-in.
        Parameters:
        devices - the list of CaptureDeviceInfo2s which are active/plugged-in