path->string

This commit is contained in:
2026-02-24 10:07:17 +01:00
parent 7807a7a209
commit 973f3f2a07
2 changed files with 14 additions and 12 deletions

View File

@@ -19,7 +19,8 @@
;; Functions to do the good stuff ;; Functions to do the good stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (flac-open flac-file cb-stream-info cb-audio) (define (flac-open flac-file* cb-stream-info cb-audio)
(let ((flac-file (if (path? flac-file*) (path->string flac-file* flac-file*))))
(if (file-exists? flac-file) (if (file-exists? flac-file)
(let ((handler (flac-ffi-decoder-handler))) (let ((handler (flac-ffi-decoder-handler)))
(handler 'new) (handler 'new)
@@ -28,7 +29,7 @@
(set-flac-handle-cb-stream-info! h cb-stream-info) (set-flac-handle-cb-stream-info! h cb-stream-info)
(set-flac-handle-cb-audio! h cb-audio) (set-flac-handle-cb-audio! h cb-audio)
h)) h))
#f)) #f)))
(define (flac-stream-state handle) (define (flac-stream-state handle)
((flac-handle-ffi-decoder-handler handle) 'state)) ((flac-handle-ffi-decoder-handler handle) 'state))

View File

@@ -41,8 +41,9 @@
(define-struct id3-picture (define-struct id3-picture
(mimetype kind size bytes)) (mimetype kind size bytes))
(define (id3-tags file) (define (id3-tags file*)
(let ((valid? #f) (let ((file (if (path? file*) (path->string file*) file*))
(valid? #f)
(title "") (title "")
(album "") (album "")
(artist "") (artist "")