Files
racket-sound/utils/utils.rkt
Hans Dijkema ad7f1345ad * flac support
* taglib support
It is possible to play some music already.
2025-08-13 14:13:35 +02:00

33 lines
870 B
Racket

(module utils racket/base
(provide while
get-lib-path
)
(define-syntax while
(syntax-rules ()
((_ cond body ...)
(letrec ((while-f (lambda (last-result)
(if cond
(let ((last-result (begin
body
...)))
(while-f last-result))
last-result))))
(while-f #f))
)
))
(define (get-lib-path lib)
(let ((platform (system-type)))
(cond
[(eq? platform 'windows)
(build-path (current-directory) ".." "lib" "dll" lib)]
[else
(error (format "Install the shared library: ~a" lib))]
)))
) ; end of module