First post, by Tristan
I finally managed to try out the windows version (power failure forced
me to reboot) and noticed a few differences in how games sound compared to the linux version. I fixed rather serious porting bug (a struct was not byte aligned when it should have been) so now both versions sound identical.
I also found a bug (affects both versions) that causes a click when some notes end. Clavinet 2 (instrument 20 counting from 0) is particularly affected. I tracked it down to the volume evelope decay code where the volume decays till it reaches 0 but then the volume has a very negative spike (around -200) that causes the click. I added the following statement to line 1278 (CSynthMT32.cpp, windows dosbox version) to limit the values of tc to non-negative values:
if (tc < 0)
tc = 0;
This appears to prevent the click however I am not sure what is causing it in the first place and why some instuments are affected more than others. Limiting the value of tc in this way is a bit of a hack but it works until the cause can be found.
A new version of the Linux port is available with a number of improvments include both fixes specified above as well as a rewrite of the buffering code. The download URL is given below.