Summary: | Add support for OpenAL-soft MIDI extensions | ||
---|---|---|---|
Product: | [JogAmp] Joal | Reporter: | Xerxes Rånby <xerxes> |
Component: | core | Assignee: | Xerxes Rånby <xerxes> |
Status: | UNCONFIRMED --- | ||
Severity: | enhancement | CC: | gouessej, sgothel |
Priority: | --- | ||
Version: | 1.0 | ||
Hardware: | All | ||
OS: | all | ||
Type: | --- | SCM Refs: | |
Workaround: | --- |
Description
Xerxes Rånby
2014-03-24 14:03:23 CET
(14:15:48) xranby: hmm whats the best way for gluegen to map functions that take a c function pointer in java? (14:17:09) eclesia: java 8 has method references. but I don't think that will do (14:20:30) xranby: Chris suggested the following function for the OpenAL MIDI extension: alLoadSoundfontSOFT(sfont /* OpenAL uint */, read_func /* read function pointer */ , file /* void pointer handled by the read function */); (14:20:43) xranby: sounds like a security nightmare (14:21:57) xranby: the idea is that the user should implement the read_func (14:22:06) xranby: size_t read_func(ALvoid *buffer, suze_t len, ALvoid *user) { return fread(buffer, 1, len, (FILE*)user); } (14:25:27) sgothel: ^^ in this case we need to manually impl. a java callback, see the JOGL GLDebugMessage thing .. (14:26:00) sgothel: jogl/src/jogl/native/GLDebugMessageHandler.c (14:26:46) sgothel: callback wrapper .. maybe the next thing to add to GlueGen, since I used them (manually) for the GL-mmap stuff as well - a lot JOAL has updated openal-soft to tip of openal-soft master branch, this should make native midi support a bit more easier. Do we need to add midi.h to be processed by GlueGen ? (In reply to comment #2) > JOAL has updated openal-soft to tip of openal-soft master branch, > this should make native midi support a bit more easier. > > Do we need to add midi.h to be processed by GlueGen ? See Bug 1018 |