anchor.diff:  ;;; Helper macros
   ;;;-----------------------------------------------------------------------------
   
  -(defmacro with-synchronized-single-channel-buffer ((buffer) &body body)
  -  (with-gensyms (body-fun)
  -    `(flet ((,body-fun () ,@body))
  -       (if (synchronizedp ,buffer)
  -           (bt:with-lock-held ((iobuf-lock (input-iobuf-of ,buffer)))
  -             (,body-fun))
  -           (,body-fun)))))
  -
  -(defmacro with-synchronized-dual-channel-buffer ((buffer &optional direction)
  +(defmacro with-synchronized-buffer ((buffer &optional direction)
                                                    &body body)
     (with-gensyms (body-fun)
       (labels ((make-locks (body direction)
  
positive.code: ;;;-----------------------------------------------------------------------------
  
  (defmethod device-position ((buffer single-channel-buffer))
    (with-synchronized-single-channel-buffer (buffer)
      (%buffer-position buffer)))
  
  (defun %buffer-position (buffer)
  
negative.code:   (with-accessors ((input-handle input-handle-of buffer)
                     (output-handle output-handle-of buffer))
        buffer
      (with-synchronized-buffer (buffer :both)
        (unless abort
          (%buffer-flush-output buffer 0))
        (device-close input-handle)
  