anchor.diff:  	   (fourcc (getf chunk :file-type)))
         (unless (string-equal id "riff")
   	(error 'unrecognized-file-format))
  -      (cond ((string-equal fourcc "wave") (read-wav-header wav stream))
  +      (cond ((string-equal fourcc "wave") (read-wav wav stream))
   	    (t (error 'unsupported-wav-file-format))))
       (when (player-callback wav)
         (funcall (player-callback wav) wav))
       (loop for chunk = (riff:read-riff-chunk stream :chunk-data-reader (chunk-decoder wav))
          while (and chunk (not (finish wav))))
  -    (loop for rec in (stream-records wav) do 
  -	 (setf (final rec) (car (wcursor rec)))
  -	 (bt:release-lock (vacancy-lock (car (wcursor rec)))))))
  -
  +    (let ((rec (car (stream-records wav))))
  +      (setf (final rec) (car (wcursor rec)))
  +      (bt:release-lock (vacancy-lock (car (wcursor rec)))))))
  
positive.code: (defmethod read-wav-stream-info ((wav wav-container) stream)
    (loop for chunk = (riff:read-riff-chunk stream)
       with rec = (make-instance 'wav-stream-record :container wav)
       when (string-equal (riff:riff-chunk-id chunk) "strh") do
         (read-audio-stream-header rec stream)
         (return-from read-wav-stream-info rec))
    (error 'malformed-wav-file-format))
  
  (defmethod read-wav-header ((wav wav-container) stream)
    (loop for chunk = (riff:read-riff-chunk stream)
       when (string-equal (riff:riff-chunk-id chunk) "wavh") do
         (flexi-streams:with-input-from-sequence (is (riff:riff-chunk-data chunk))
  	 (riff:read-u4 is)   ;;dwMicroSecPerFrame
  	 (riff:read-u4 is)   ;;dwMaxBytesPerSec
  	 (setf (padding wav) (riff:read-u4 is)
  	       (flags wav) (riff:read-u4 is))
  	 (riff:read-u4 is)   ;;dwTotalFrames
  	 (riff:read-u4 is)   ;;dwInitialFrames
  	 (setf (nstreams wav) (riff:read-u4 is))
  	 (riff:read-u4 is) ;;dwSuggestedBufferSize
  	 (setf (width wav) (riff:read-u4 is)
  	       (height wav) (riff:read-u4 is))
  	 (riff:read-u4 is) (riff:read-u4 is) (riff:read-u4 is) (riff:read-u4 is))
         (setf (stream-records wav)
  	     (loop repeat (nstreams wav) collecting (read-wav-stream-info wav stream)))
         (return)))
  
  (defmethod find-pcm-stream-record ((container av-container))
    nil)
  
  (defmethod find-pcm-stream-record ((wav wav-container))
    ;; only one stream in wav container
  
negative.code: (defmethod stream-playback-start ((rec wav-stream-record))
    (call-next-method))
  
  (define-constant +frame-duration-seconds+ 5)
  (define-constant +chunk-granularity-scale+ 10) ;10 per second
  
  (defmethod shared-initialize :after ((rec wav-stream-record) slots &key &allow-other-keys)
    (declare (ignorable slots))
    (initialize-ring rec (/ +frame-duration-seconds+ +chunk-granularity-scale+)
  		   :frame-size (/ (* (sample-rate rec) (block-align rec)) +chunk-granularity-scale+)))
  
  (defmethod read-audio-stream-header ((rec wav-stream-record) stream)
    (let ((chunk (riff:read-riff-chunk stream)))
      (flexi-streams:with-input-from-sequence (is (riff:riff-chunk-data chunk))
        (setf (compression-code rec) (riff:read-u2 is)
  	    (number-of-channels rec) (riff:read-u2 is)
  	    (sample-rate rec) (riff:read-u4 is)
  	    (average-bytes-per-second rec) (riff:read-u4 is)
  	    (block-align rec) (riff:read-u2 is)
  	    (significant-bits-per-sample rec) (riff:read-u2 is))
        (debug-log (format nil "Audio stream with sample rate ~D at ~D bits per sample" (sample-rate rec) (significant-bits-per-sample rec)))
        (unless (eql (compression-code rec) +pcmi-uncompressed+)
  	(setf (extra-format-bytes rec) (riff:read-u2 is)
  	      (extra-bytes rec) (make-array (extra-format-bytes rec) :element-type (stream-element-type is)))
  	(read-sequence (extra-bytes rec) is)))))
  
  (defmethod decode-media-stream ((rec wav-stream-record) fsize input-stream)
    (let* ((chunk (pop (wcursor rec)))
  