This commit is contained in:
2026-02-23 15:32:50 +01:00
parent 4920457282
commit 3439bd8fdc
3 changed files with 155 additions and 9 deletions

View File

@@ -1,7 +1,8 @@
#lang racket/base
(require "libao-ffi.rkt"
"libao-async-ffi.rkt"
;"libao-async-ffi.rkt"
"libao-async.rkt"
(prefix-in fin: finalizer)
ffi/unsafe
data/queue
@@ -87,7 +88,7 @@
(set-ao-handle-byte-format! handle endianness)
(set-ao-handle-rate! handle rate)
(set-ao-handle-channels! handle channels)
(set-ao-handle-async-player! handle (ao_create_async ao-device ao_play_ptr))
(set-ao-handle-async-player! handle (ao_create_async ao-device)) ; ao_play_ptr))
(hash-set! devices handle-num ao-device)
(fin:register-finalizer handle
(lambda (handle)
@@ -97,6 +98,7 @@
)))
(define (ao-close handle)
(displayln handle)
(if (number? handle)
(let ((ao-device (hash-ref devices handle #f)))
(unless (eq? ao-device #f)