[fetter-devel] OpenAL or Bust
Kenny Tilton
ktilton at nyc.rr.com
Wed Sep 7 03:49:55 UTC 2005
My OpenAL code also uses stuff from alc.h, so I modified my binding def:
(defbinding "openal-library"
(nicknames "al")
(flags "")
(include
"AL/al.h"
"AL/alc.h"
"AL/alut.h")
(export "alenable"
"aldisable")
(override ""))
This yielded amongst other good stuff:
(cffi:defcstruct alcdevice-struct)
...on which we get divide-by-zero in CFFI because
notice-foreign-struct-definition initializes max-align to zero and that
never gets bumped up (because there are no slots and that is when it
gets adjusted) and then gets used in a rem to determine padding.
Checking alc.h and the rest of the al includes, I do not see any actual
definition for alcdevice-struct. I guess the type is needed to define
the functions which get passed a pointer to a device struct, but the
actual make-up of the struct is pure internal.
I will let you all fight it out, but it looks as if CFFI needs to be
more tolerant? I will try initializing the max-align to 2 and see how
much further I get.
--
Kenny
Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film
"I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it."
Elwood P. Dowd, "Harvey", 1950
More information about the fetter-devel
mailing list