I'm using a C# to winx64.dll wrapper, but I've found it to be mostly consistent to the C syntax in the API page.
Firstly, some sunvox songs (such as nt's Berlin FM) are quite CPU heavy. In real-time applications the 64bit version might be have buffer underruns while the 32bit version fares better. I was wondering which parts of the x64 engine are more demanding so i can keep those in check when making more complicated projects.
Also, would a lofi-x64 version be possible?
As for functions, I have some trouble getting correct output of sv_get_module_scope2(). The data it returns is almost right but there is a slight crackling in the output. When checking the values it looks like 3 to 10 samples of data at the end of the previous buffer are at the start of the new buffer, which causes the crackling. Is this a bug or am i doing something wrong? This happens both with sv_audio_callback() and built-in output.
for reference, my code looks something like this.
Code: Select all
//dummy buffer is just used to trigger a callback
SunVox.sv_audio_callback(dummybuffer, dummybuffer.Length / 2, 0, SunVox.sv_get_ticks());
SunVox.sv_get_module_scope2(sunvoxSlot, moduleNum, 0, tempBuffer, (uint)tempBuffer.Length);
//convert mono int16 to stereo interleaved float32 of double size
for (int i = 0; i < tempBuffer.Length; i++)
{
floatConversion = tempBuffer[i] / 32768f;
data[i + i] = floatConversion;
data[i + i + 1] = floatConversion;
}