-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathload-fluidsynth.lisp
31 lines (21 loc) · 970 Bytes
/
load-fluidsynth.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
;; common lisp - fluidsynth connection kit, supports 'internal' fluidsynth,
(defpackage :cl-fluidsynth (:use :common-lisp :cffi))
(in-package :cl-fluidsynth)
;;; swig-generated FFI-wrappers for {include}/fluidsynth.h,
;;; {include}/fluidsynth/*.h - spec in ./fluidsynth.i
(defun compile?-and-load (file)
#+lispworks (hcl::compile-file-if-needed file)
(load file))
(setf cl-fluidsynth-files '("fluidsynth_ffi" "cl-fluidsynth" "fluidsynth_external"))
;; (dolist (file cl-fluidsynth-files)
;; (om::compile&load (make-pathname :directory (pathname-directory *load-pathname*) :name file)))
(dolist (file cl-fluidsynth-files)
(compile?-and-load (make-pathname :directory (pathname-directory *load-pathname*) :name file)))
(defun cl-fluid-init-fluidsynth ()
(cl-fluid-init-fluidsynth-ffi)
(cl-fluid-setup-fluidsynth)
;;(fluid_version_str)
)
(oa::om-add-init-func 'cl-fluid-init-fluidsynth)
(pushnew :cl-fluidsynth *features*)
(provide :cl-fluidsynth)