Browse Source

commenting/cleanup

Mark VandenBrink 12 năm trước cách đây
mục cha
commit
bed2d81eff
2 tập tin đã thay đổi với 14 bổ sung8 xóa
  1. 6 4
      README.md
  2. 8 4
      mp4-atom.lisp

+ 6 - 4
README.md

@@ -2,8 +2,10 @@ Copyright (c) 2013, Mark VandenBrink. All rights reserved.
 
 A pure Lisp implementation for reading MPEG-4 audio and MPEG-3 audio tags and audio information.
 
-Mostly complete.
+** Mostly complete.  Your mileage may vary. Most definitely, NOT portable.  Heavily dependent on Clozure CCL.
 
-Most definitely, NOT portable.  Heavily dependent on Clozure CCL.
-
-Make your life simple---install quicklisp to get all the dependencies loaded!
+Note: There a lot of good (some great) audio file resources out there.  Here are a few of them:
+* [-smash][http://code.google.com/p/l-smash/]
+* [taglib][http://taglib.github.io/]
+* [mplayer][http://www.mplayerhq.hu]
+* [The MP4 Book][http://www.amazon.com/gp/search?index=books&linkCode=qs&keywords=0130616214]

+ 8 - 4
mp4-atom.lisp

@@ -607,12 +607,16 @@ return trak.mdia.mdhd and trak.mdia.minf.stbl.stsd"
 (defmethod vpprint ((me audio-info) stream)
   (with-slots (seconds channels bits-per-sample sample-rate max-bit-rate avg-bit-rate) me
 	(format stream "sample rate: ~:d Hz, # channels: ~d, bits-per-sample: ~:d, max bit-rate: ~:d Kbps, avg bit-rate: ~:d Kbps, duration: ~:d:~2,'0d"
-			sample-rate channels bits-per-sample
-			(round (/ max-bit-rate 1000))
-			(round (/ avg-bit-rate 1000))
-			(floor (/ seconds 60)) (round (mod seconds 60)))))
+			(if sample-rate sample-rate 0)
+			(if channels channels 0)
+			(if bits-per-sample bits-per-sample 0)
+			(if max-bit-rate (round (/ max-bit-rate 1000)) 0)
+			(if avg-bit-rate (round (/ avg-bit-rate 1000)) 0)
+			(if seconds (floor (/ seconds 60)) 0)
+			(if seconds (round (mod seconds 60)) 0))))
 
 (defun get-mp4-audio-info (mp4-file)
+  "MP4a audio info is held in under the trak.mdia.mdhd/trak.mdia.minf.stbl/trak.mdia.minf.stbl.mp4a atoms."
   (let ((info (make-instance 'audio-info)))
 	(multiple-value-bind (mdhd mp4a esds) (get-audio-properties-atoms mp4-file)
 	  (with-slots (seconds channels bits-per-sample sample-rate max-bit-rate avg-bit-rate) info