SunVox Engine DLL

Previous topic - Next topic

spicypixel

Thank you very much for the old DLL. I did think it might be to do with a newer DLL but I downloaded it a long time ago and it didn't work then so I wasn't sure. Will try this new(old) DLL now and report back :)

Any thoughts on updating the wrapper, or some links, guides for others to follow should they wish to walk in your footsteps :D
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

Ruidesco

IIRC the proper sunvox_dll.zip from the SunVox website includes a sunvox.h, which is where I got the function names/parameters to wrap back then.

As you can see the wrapper is nothing fancy at all. It should suffice swapping the quoted old function names/parameters in the DECLARE_C_ALIAS calls for the current ones, and adding the new ones if need be.

spicypixel

Quote from: Ruidesco on 2012-Nov-18
It would seem that the current SunVox library has changed, so its previously existing functions have different names besides there being more in number. If you use the SunVox library from last year this example works.

This works perfectly, think I may look at the new dll thanks for the heads up :)
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

spicypixel

I changed these and it works with the latest DLL. I'll investigate the other names/params as and when but this is cool :)

Code (glbasic) Select

DECLARE_C_ALIAS(exSV_OPEN_SLOT,    libSunVox, "sv_open_slot", (int slot),   int);
DECLARE_C_ALIAS(exSV_CLOSE_SLOT,    libSunVox, "sv_close_slot", (int slot),   int);
DECLARE_C_ALIAS(exSV_INIT,    libSunVox, "sv_init", (const char* dev, int freq, int channels, int flags),   int);
DECLARE_C_ALIAS(exSV_DEINIT,    libSunVox, "sv_deinit", (void),   int);
DECLARE_C_ALIAS(exSV_LOAD,    libSunVox, "sv_load", (int slot, const char* name),   int);
DECLARE_C_ALIAS(exSV_PLAY,    libSunVox, "sv_play", (int slot),   int);
DECLARE_C_ALIAS(exSV_PLAY_FROM_BEGINNING,    libSunVox, "sv_play_from_beginning", (int slot),   int);
DECLARE_C_ALIAS(exSV_STOP,    libSunVox, "sv_stop", (int slot),   int);
DECLARE_C_ALIAS(exSV_REWIND,    libSunVox, "sv_rewind", (int slot, int t),   int);
DECLARE_C_ALIAS(exSV_VOLUME,    libSunVox, "sv_volume", (int slot, int vol),   int);
DECLARE_C_ALIAS(exSV_SEND_EVENT,    libSunVox, "sv_send_event", (int slot, int channel_num, int note, int vel, int module, int ctl, int ctl_val), int);
DECLARE_C_ALIAS(exSV_GET_CURRENT_LINE,    libSunVox, "sv_get_current_line", (int slot),   int);
DECLARE_C_ALIAS(exSV_GET_CURRENT_SIGNAL_LEVEL, libSunVox, "sv_get_current_signal_level", (int slot, int channel),
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.