I’ve just finished to build an entire [color=yellow:291g9d68][b:291g9d68]JAVA wrapped[/b:291g9d68][/color:291g9d68] of the fmod API. 😆
I only test the basic functions: play differents musics from Hard drive and Audio CD. So, I need people to test it in more details and report me the bugs to I correct it.
If you are interested to use or test it, contact me by mail. I send you the Java support by mail with a small music player (in java) using fmod.
(for instance, I don’t have a web site)
[quote="jouvieje":o3qfxq35]I’ve just put the Fmod wrapper online (thanks to aNt who have seen my last reply).
I name the wrapper: NativeFmod.
It is available at this page:
Let me know if you have any problems using it.[/quote:o3qfxq35]
The location is not available since some days.
- ervo answered 14 years ago
This would be really nice!
I thought of that, too:
Java-native functions do need a DLL whose Function-Names have to start with Java* and contain the class-name inside (I just don’t have the exact syntax in mind)
So you would have to recompile the fmod.dll with the new functionnames.
Or: You have to create a wrapper-DLL for this, whose functionnames do match the requested ones and which are just calling the fmod.dll-functions.
I could try this in PureBasic (I don’t know C/++ until now), but PureBasic is not object-oriented, but for communicating Strings and Arrays from Java<->external DLL you have to catch/send the data through object-instances.
While trying around a bit I could find the String-content of the String-object sent to the DLL, using a really complex Peek-path from inside the DLL, but I don’t know if all Java-String-Object’s memorystructure is the same.
But Purebasic supports now a new feature, a kind of structure named ‘Interface’, which allows you to do some ‘half’-OOP – seems to be the needed half 😉 – but I didn’t had the time to look deeper onto it.
So, perhaps ONE DAY I will make this wrapper, if not anyone else before – or already had ?
Perhaps you do have the know-how and just wanted to spare time ?
You could just use swig (simplified wrapper interface generator) http://www.swig.org
swig doesn’t make the fastest bindings, but it is quite easy to make a c library wrapper with. IMHO it would only take a couple of hours to do a rough one for fmod.
Why??? didn’t you download the prebuilt exe for windoze? Swig also comes standard with most linux distros.
That “couple of hours” was for simplifying the fmod header into a swig interface. This really shouldn’t be hard- I did a simple alsa wrapper for python in a couple of hours.
One thing with swig: it says in “supports virtual functions”, but don’t expect it to auto call script overrides from C++ automatically i.e. it just wraps virtual functions like normal.
Please login first to submit.