-
This commit is contained in:
@@ -10,8 +10,21 @@
|
||||
(define fmt (ao-mk-format 24 48000 2 'big-endian))
|
||||
(define ao-h (ao-open-live #f fmt))
|
||||
|
||||
(define current-seconds 0)
|
||||
|
||||
(define (flac-play frame buffer)
|
||||
(ao-play ao-h buffer))
|
||||
(let* ((sample (hash-ref frame 'number))
|
||||
(rate (hash-ref frame 'sample-rate))
|
||||
(second (/ (* sample 1.0) (* rate 1.0)))
|
||||
)
|
||||
(ao-play ao-h second buffer)
|
||||
)
|
||||
(let ((s (inexact->exact (round (ao-at-second ao-h)))))
|
||||
(when (> s current-seconds)
|
||||
(set! current-seconds s)
|
||||
(displayln (format "At second: ~a" (ao-at-second ao-h)))
|
||||
))
|
||||
)
|
||||
|
||||
(define (flac-meta meta)
|
||||
(displayln meta))
|
||||
|
||||
Reference in New Issue
Block a user