Reordering FFI libs

This commit is contained in:
2026-02-23 08:20:04 +01:00
parent 4afca18124
commit 4920457282
10 changed files with 62 additions and 73 deletions

View File

@@ -3,9 +3,7 @@
(require ffi/unsafe
ffi/unsafe/define
setup/dirs
"../utils/utils.rkt"
racket/runtime-path
"libao-ffi.rkt"
)
@@ -17,20 +15,8 @@
ao_clear_async
)
(define-runtime-path libao-async-lib-path "./lib")
(define lib (if (eq? (system-type 'os) 'windows)
(build-path libao-async-lib-path "ao-play-async")
(build-path libao-async-lib-path "libao-play-async")))
(define-ffi-definer define-libao-async
(ffi-lib lib '("0" #f)
#:get-lib-dirs (λ ()
(let ((sp (cons (build-path ".") (get-lib-search-dirs))))
;(displayln sp)
sp))
#:fail (λ () (error "Cannot load libao-play-async"))
))
(define lib (get-lib '("ao-play-async" "libao-play-async") '(#f)))
(define-ffi-definer define-libao-async lib)
(define _libao-async-handle-pointer (_cpointer 'ao-async-handle))