anchor.diff:  						  (declare (ignore depth))
   						  (when (= (atom-type atom) search-name)
   							(push atom found))))
  -	found))
  -
  -;; (defun get-audio-properties-atoms (mp4-file)
  -;;   "First, find all TRAKs under moov. For the one that contains a HDLR atom with DATA of 'soun',
  -;; return trak.mdia.mdhd and trak.mdia.minf.stbl.stsd"
  -;;   (dolist (track (find-all (traverse (mp4-atoms mp4-file) (list +mp4-atom-moov+)) "trak"))
  -;; 	(format t "track = ~a~%" track)
  -;; 	(let ((hdlr (traverse track (list +mp4-atom-mdia+ +audioprop-hdlr+))))
  -;; 	  (format t "hdlr = ~a~%" hdlr)
  -;; 	  (when (and (not (null hdlr))
  -;; 				 (string= "soun" (subseq (data hdlr) 8 12)))
  -
  -;; 		;; we've found the correct track, extract atoms
  -;; 		(return-from get-audio-properties-atoms (values (traverse track (list +mp4-atom-mdia+ +audioprop-mdhd+))
  -;; 														(traverse track (list +mp4-atom-mdia+ +mp4-atom-minf+ +mp4-atom-stbl+ +audioprop-stsd+)))))))
  -;;   nil)
  +	(nreverse found)))
  +
  +(defun get-audio-properties-atoms (mp4-file)
  +  "First, find all TRAKs under moov. For the one that contains a HDLR atom with DATA of 'soun',
  +return trak.mdia.mdhd and trak.mdia.minf.stbl.stsd"
  +  (dolist (track (find-all (traverse (mp4-atoms mp4-file) (list +mp4-atom-moov+)) "trak"))
  +	(let ((hdlr (traverse track (list +mp4-atom-mdia+ +audioprop-hdlr+))))
  +	  (when (and (not (null hdlr))
  +				 (not (null (mtype hdlr)))
  +				 (string= "soun" (as-string (mtype hdlr))))
  +		;; we've found the correct track, extract atoms
  +		(return-from get-audio-properties-atoms (values (traverse track (list +mp4-atom-mdia+ +audioprop-mdhd+))
  +														(traverse track (list +mp4-atom-mdia+ +mp4-atom-minf+ +mp4-atom-stbl+ +audioprop-mp4a+))
  +														(traverse track (list +mp4-atom-mdia+ +mp4-atom-minf+ +mp4-atom-stbl+ +audioprop-mp4a+ +audioprop-esds+)))))))
  +  nil)
  +
  +;;; song length is seconds is (float duration) / (float scale)
  +(defun get-audio-properties (mp4-file)
  +  (let ((time))
  +	(multiple-value-bind (mdhd mp4a esds) (get-audio-properties-atoms mp4-file)
  +	  (progn
  +		(format t "mdhd: ~a~%" (vpprint mdhd nil))
  +		(format t "mp4a: ~a~%" (vpprint mp4a nil))
  +		(format t "esds: ~a~%" (vpprint esds nil))
  +		(when mdhd
  +		  (setf time (/ (float (duration mdhd)) (float (scale mdhd))))
  +		  (format t "~a seconds~%" time))
  +		(when mp4a
  +		  (inspect mp4a)
  +		  (format t "channels: ~d~%" (num-chans mp4a))
  +		  (format t "bite/sample: ~:d~%" (samp-size mp4a))
  +		  (let* ((upper (ash (samp-rate mp4a) -16))
  +				 (lower (logand (samp-rate mp4a) #xffff))
  +				 (rate (+ (float upper) (/ (float lower) 1000))))
  +		  (format t "sample rate: ~:d~%" rate)))
  +		(when esds
  +		  (format t "XXX~%"))))))
  
positive.code: ;;; A word about atoms (aka "boxes").  There are three kinds of atoms: ones that are containers, ones
  ;;; that are data, and ones that are both. A lot of the source code for taggers out there mostly ignore
  ;;; the third class and treat "container atoms that also have data" as a big blob of data that they
  ;;; rummage around in via indices.  Seems sort of broke, IMHO, so we'll try to handle all three if
  ;;; at all possible.
  ;;;
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (defun as-int (str)
    "Given a 4-byte string, return an integer type equivalent.
  
negative.code: 
  	(log-mp4-atom "find-mp4-atoms: ~a, before read-file loop, file-position = ~:d, end = ~:d"
  				  (stream-filename mp4-file) (stream-seek mp4-file 0 :current) (stream-size mp4-file))
  
  	(let ((atoms))
  	  (atom-read-loop mp4-file (stream-size mp4-file)
  					  (lambda ()
  						(let ((new-atom (make-mp4-atom mp4-file)))
  						  (when new-atom
  							(push new-atom atoms)))))
  	  (setf (mp4-atoms mp4-file) (nreverse atoms))) ; preserve in-file-order
  
  	(log-mp4-atom "find-mp4-atoms: returning list of size ~d" (length (mp4-atoms mp4-file)))))
  
  (defmethod map-mp4-atom ((atoms list) &key (func nil) (depth nil))
    "Given a list of atoms, call map-mp4-atom for each one"
    (log5:with-context "map-mp4-atom"
  	(dolist (a atoms)
  	  (map-mp4-atom a :func func :depth depth))))
  
  (defmethod map-mp4-atom ((me mp4-atom) &key (func nil) (depth nil))
    "traverse all atoms under a given atom"
  