opus conversie
This commit is contained in:
+3
-11
@@ -1,16 +1,8 @@
|
||||
#lang racket/base
|
||||
|
||||
(require "fingerprint.rkt")
|
||||
|
||||
(provide inspect-flac-sample-rate)
|
||||
|
||||
(define (inspect-flac-sample-rate path)
|
||||
(define call-with-id3-tags (dynamic-require 'racket-audio/taglib 'call-with-id3-tags))
|
||||
(define tags-valid? (dynamic-require 'racket-audio/taglib 'tags-valid?))
|
||||
(define tags-sample-rate (dynamic-require 'racket-audio/taglib 'tags-sample-rate))
|
||||
(define sr
|
||||
(call-with-id3-tags path
|
||||
(lambda (tags)
|
||||
(and (tags-valid? tags) (tags-sample-rate tags)))
|
||||
#:mode 'read))
|
||||
(unless (and (integer? sr) (positive? sr))
|
||||
(error 'inspect-flac-sample-rate "cannot determine sample rate for ~a" path))
|
||||
sr)
|
||||
(flac-streaminfo-sample-rate (read-flac-streaminfo path)))
|
||||
|
||||
Reference in New Issue
Block a user