This commit is contained in:
2026-02-22 17:37:15 +01:00
parent 869fa8739f
commit 2cc96f30ae
6 changed files with 138 additions and 56 deletions

View File

@@ -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))