anchor.diff:  (defparameter +wave+ (babel:string-to-octets "WAVE"))
   (defconstant +header-size+ (* 8 44))
   
  -(declaim (inline integer-to-array))
  -(defun integer-to-array (val array &optional (size 8))
  +(defun integer-to-array (val array)
  +  (declare (optimize (speed 3))
  +	   (type (unsigned-byte 32) val)
  +	   (type (simple-array (unsigned-byte 8)) array))
     (loop for i below (length array)
  -	for pos from 0 by size do
  +	for pos from 0 by 8 do
   	(setf (aref array i)
  -	      (ldb (byte size pos) val)))
  +	      (ldb (byte 8 pos) val)))
     array)
   
   (defun mixchannels (out buffers)
  
positive.code:       (with-open-file (out-stream wav-name
  				  :direction :output
  				  :if-exists :append
  				  :element-type (list 'signed-byte (streaminfo-bitspersample streaminfo)))
  		      (file-position out-stream
  				     (/ (ash 44 3) (streaminfo-bitspersample streaminfo)))
  
  		      (let ((buf (make-array (* (streaminfo-minblocksize streaminfo)
  						(streaminfo-channels streaminfo))
  					     :element-type '(signed-byte 32))))
  
  			(loop for i below (streaminfo-totalsamples streaminfo)
  			      by (streaminfo-minblocksize streaminfo) do
  			      (write-sequence (mixchannels buf (frame-decode (frame-reader stream streaminfo)))
  					      out-stream)))))
      (close stream)))
  
negative.code: 				  :element-type '(unsigned-byte 8))
  		      ;; Fill headers
  		      (write-sequence +wav-chunk-id+ out-stream)
  		      (let ((size
  			     (ash
  			      (* bps channels totalsamples) -3)))
  			
  			(write-sequence (integer-to-array (+ 36 size) buf4) out-stream)
  			(write-sequence +wave+ out-stream)
  			
  