Bug 1002 - Add support for OpenAL-soft MIDI extensions
Summary: Add support for OpenAL-soft MIDI extensions
Status: UNCONFIRMED
Alias: None
Product: Joal
Classification: JogAmp
Component: core (show other bugs)
Version: 1.0
Hardware: All all
: --- enhancement
Assignee: Xerxes Rånby
URL:
Depends on:
Blocks:
 
Reported: 2014-03-24 14:03 CET by Xerxes Rånby
Modified: 2014-06-11 01:41 CEST (History)
2 users (show)

See Also:
Type: ---
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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