SV Library questions

Multi-platform modular music creation studio
Post Reply
User avatar
SolarLune
Posts: 511
Joined: Tue Oct 26, 2010 9:54 pm
Contact:

SV Library questions

Post by SolarLune »

Hey, there.

I'm looking into using the SunVox library to playback music dynamically in my game. I'm not used to working with DLLs / header files, so I was wondering if there was a document that listed the API for the library or something.

I'm working with Golang, so I'm not sure about exactly how I could call out to the library, which is why some documentation would be appreciated..

Thanks!
User avatar
NightRadio
Site Admin
Posts: 3944
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: SV Library questions

Post by NightRadio »

Hi!
SunVox library is a binary so (Linux) or dll (Windows) file with the C functions inside.
The sunvox.h file describes all available SunVox functions. It also defines two special functions for the library loading and unloading: sv_load_dll(), sv_unload_dll().
But this is only for C/C++ compilers.
Every other language has its own API for loading and calling the C functions from some external library (like sunvox.so).
In the "headers" folder you can see such examples for Pixilang and Free Pascal.
So in theory there must be a similar file sunvox.go with something like this inside: https://github.com/coreos/pkg/blob/mast ... /dlopen.go
I know almost nothing about Golang, so i can't tell you more, sorry :)
BugBiteSquared
Posts: 1
Joined: Tue Jun 12, 2018 12:29 am

Re: SV Library questions

Post by BugBiteSquared »

I'm in a somewhat similar boat and I'm trying to get SunVox working as a GDNative module in the Godot game engine, targeting mobile platforms. Are there static libraries I could link against so I can simply wrap Sunvox and compile new shared libraries accordingly? The download link mentions static libraries, but I didn't spot any. Using Sunvox's shared libraries seems like it would complicate the build process significantly in this case or possibly make it untenable to use Sunvox as an engine module.

I really like what Sunvox can do, so I'm really hoping I can get it integrated.
Post Reply