/**
   * Opens a connection to the media source specified by the <tt>MediaLocator</tt> of this
   * <tt>DataSource</tt>.
   *
   * @throws IOException if anything goes wrong while opening the connection to the media source
   *     specified by the <tt>MediaLocator</tt> of this <tt>DataSource</tt>
   * @see AbstractPullBufferCaptureDevice#doConnect()
   */
  @Override
  protected void doConnect() throws IOException {
    super.doConnect();

    /*
     * XXX The AudioRecordStream will connect upon start in order to be able
     * to respect requests to set its format.
     */
  }
  /**
   * Closes the connection to the media source specified by the <tt>MediaLocator</tt> of this
   * <tt>DataSource</tt>.
   *
   * @see AbstractPullBufferCaptureDevice#doDisconnect()
   */
  @Override
  protected void doDisconnect() {
    synchronized (getStreamSyncRoot()) {
      Object[] streams = streams();

      if (streams != null) for (Object stream : streams) ((AudioRecordStream) stream).disconnect();
    }

    super.doDisconnect();
  }