Bug 1002

Summary: Add support for OpenAL-soft MIDI extensions
Product: [JogAmp] Joal Reporter: Xerxes Rånby <xerxes>
Component: coreAssignee: 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
Chris Robinson who maintains OpenAL soft has recently added MIDI support extensions to OpenAL.
http://openal.org/pipermail/openal/2014-January/000005.html

JOAL should be updated to support the new extensions exposed by the OpenAL-soft alMidi.h header.
http://repo.or.cz/w/openal-soft.git/blob/HEAD:/OpenAL32/Include/alMidi.h
Comment 1 Xerxes Rånby 2014-03-24 15:03:56 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
Comment 2 Sven Gothel 2014-06-11 01:40:37 CEST
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 ?
Comment 3 Sven Gothel 2014-06-11 01:41:00 CEST
(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