anchor.diff:  
   (defpackage :mezzano.driver.sound
     (:use :cl)
  +  (:local-nicknames (:sync :mezzano.sync)
  +                    (:sup :mezzano.supervisor))
     (:export #:sound-card
              #:register-sound-card
              #:sound-card-run
  +           #:sound-card-presence-event
              #:master-volume
              #:make-sound-output-sink
              #:sink-volume
  
positive.code: (defvar *cards* '())
  
  (defvar *sinks* '())
  (defvar *sink-lock* (mezzano.supervisor:make-mutex "Sound output sink lock"))
  (defvar *sink-cvar* (mezzano.supervisor:make-condition-variable "Sound output sink cvar"))
  
  (defvar *master-volume* 1.0)
  
  
negative.code:                               (lambda (sink)
                                  (buffer-empty sink))
                                *sinks*))
                 (when (endp *sinks*)
                   (setf (sup:event-state *sinks-present-event*) nil))
                 ;; Samples have been consumed, wake fillers.
                 (mezzano.supervisor:condition-notify *sink-cvar* t)
                 ;; Leave the card running.
  