Переглянути джерело

documentation, cleanup, reworking mpeg.lisp to be faster

Mark VandenBrink 12 роки тому
батько
коміт
dd54b78d43
4 змінених файлів з 8 додано та 3 видалено
  1. 2 0
      README.md
  2. 4 1
      audio-streams.lisp
  3. 1 1
      mpeg.lisp
  4. 1 1
      taglib-tests.asd

+ 2 - 0
README.md

@@ -30,6 +30,8 @@ Notes II:
   called *get-audio-info* that controls whether parse-mp4-file/parse-mp3-file try to extract this info.  To speed things up,
   you can bind this this parameter to nil (eg: (let ((audio-streams:*get-audio-info* nil)) (parse-...)).  As an example, when we're 
   not getting audio-info, parsing an MP3 takes microsends.  When we are, it takes seconds.
+* For now, USE-MMAP in *features* is purely experimental. Seems pretty flakey, but that's probably because I'm using ccl:: methods without
+  much regard to sanity...
 
 And now for some sample invocations and outputs:
 

+ 4 - 1
audio-streams.lisp

@@ -193,7 +193,10 @@ Thus (stream-seek in) == (stream-seek in 0 :current)"
                  (setf (ldb (byte 8 0) retval) (aref octets 1))
                  (setf (ldb (byte 8 8) retval) (aref octets 0))
                  (when (not (or (= #xfffe retval) (= #xfeff retval)))
-                   (error "got an invalid byte-order mark of ~x" retval))
+                   (error 'audio-stream-condition
+                          :location "stream-decode-ucs-string"
+                          :object nil
+                          :message (format nil "got an invalid byte-order mark of ~x" retval)))
                  retval)))
 
       ;; special case: empty (and mis-coded) string

+ 1 - 1
mpeg.lisp

@@ -436,8 +436,8 @@
             (round (/ bit-rate 1000))
             (floor (/ len 60)) (round (mod len 60)))))
 
-(defparameter *max-frames-to-read* most-positive-fixnum "when trying to determine bit-rate, etc, read at most this many frames")
 
+(defparameter *max-frames-to-read* most-positive-fixnum "when trying to determine bit-rate, etc, read at most this many frames")
 (defun get-mpeg-audio-info (in &key (max-frames *max-frames-to-read*))
   "Get MPEG Layer 3 audio information."
   (log5:with-context "get-mpeg-audio-info"

+ 1 - 1
taglib-tests.asd

@@ -3,7 +3,7 @@
 ;;;
 
 ;(pushnew :I-AM-MARKV *features*)
-(pushnew :USE-MMAP *features*)
+;(pushnew :USE-MMAP *features*)
 
 (asdf:defsystem #:taglib-tests
   :description "Simple demo/test code for taglib"