Ver Fonte

changed from osicat to cl-fad

Mark VandenBrink há 12 anos atrás
pai
commit
c0d114a702
2 ficheiros alterados com 12 adições e 13 exclusões
  1. 1 1
      taglib-tests.asd
  2. 11 12
      taglib-tests.lisp

+ 1 - 1
taglib-tests.asd

@@ -8,5 +8,5 @@
   :description "Simple demo/test code for taglib"
   :author "Mark VandenBrink"
   :license "Public Domain"
-  :depends-on (#:taglib #:osicat)
+  :depends-on (#:taglib #:cl-fad)
   :components ((:file "taglib-tests")))

+ 11 - 12
taglib-tests.lisp

@@ -47,18 +47,17 @@
         (mp4-count 0)
         (other-count 0))
 
-    (osicat:walk-directory dir (lambda (f)
-                                 (let ((full-name (merge-pathnames (ccl:current-directory) (pathname f))))
-                                   (do-audio-file full-name :func (lambda (s)
-                                                            (cond ((typep s 'mp3-file-stream)
-                                                                   (incf mp3-count)
-                                                                   (when mp3-func
-                                                                     (funcall mp3-func s)))
-                                                                  ((typep s 'mp4-file-stream)
-                                                                   (incf mp4-count)
-                                                                   (when mp4-func
-                                                                     (funcall mp4-func s)))
-                                                                  ((null s) (incf other-count))))))))
+    (cl-fad:walk-directory dir (lambda (f)
+                                 (do-audio-file f :func (lambda (s)
+                                                          (cond ((typep s 'mp3-file-stream)
+                                                                 (incf mp3-count)
+                                                                 (when mp3-func
+                                                                   (funcall mp3-func s)))
+                                                                ((typep s 'mp4-file-stream)
+                                                                 (incf mp4-count)
+                                                                 (when mp4-func
+                                                                   (funcall mp4-func s)))
+                                                                ((null s) (incf other-count)))))))
 
     (format t "~&~:d MP3s, ~:d MP4s, ~:d Others, for a total of ~:d~%"
             mp3-count mp4-count other-count (+ mp3-count mp4-count other-count))))