浏览代码

making audio-info routines more similar

Mark VandenBrink 12 年之前
父节点
当前提交
0b418468ba
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 4 2
      mp4-atom.lisp
  2. 1 1
      mp4-tag.lisp

+ 4 - 2
mp4-atom.lisp

@@ -608,8 +608,10 @@ 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, avg bit-rate: ~:d, duration: ~:d:~2,'0d"
-			sample-rate channels bits-per-sample max-bit-rate avg-bit-rate
+	(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)))))
 
 (defun get-mp4-audio-info (mp4-file)

+ 1 - 1
mp4-tag.lisp

@@ -66,7 +66,7 @@
 
 		(if (audio-info me)
 		  (mp4-atom:vpprint (audio-info me) t))
-		(when album (format t "~4talbum: ~a~%" album))
+		(when album (format t "~&~4talbum: ~a~%" album))
 		(when album-artist (format t "~4talbum-artist: ~a~%" album-artist))
 		(when artist (format t "~4tartist: ~a~%" artist))
 		(when comment (format t "~4tcomment: ~a~%" comment))