ffmpeg support

This commit is contained in:
2026-04-28 15:04:12 +02:00
parent d78a0ae9ff
commit d55f52818d
33 changed files with 157 additions and 22 deletions
+24 -2
View File
@@ -2,7 +2,9 @@
(require racket/contract
racket/path
racket/string)
racket/string
racket/runtime-path
)
(provide audio-format?
audio-sniff-format
@@ -333,4 +335,24 @@
(define/contract (audio-format-matches? file formats)
(-> path-string? (listof symbol?) boolean?)
(audio-format-matches?* file formats))
(audio-format-matches?* file formats))
(define-runtime-path audio-tests "tests")
(define (sniff-test)
(for-each (λ (ext)
(let* ((dir (build-path audio-tests))
(ext* (format ".~a" ext))
(files (map (λ (f)
(build-path audio-tests f))
(filter (λ (f)
(string-suffix? (format "~a" f) ext*))
(directory-list dir))))
)
(for-each (λ (f)
(displayln (format "~a: ~a" f (audio-sniff-format/extension f))))
files)
)
)
'(aac adts flac mp3 ogg ts ac3 aiff m4a mp4 ogx wav wv mp2))
)