You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix for issue #474, and a few other bugs in MODGenerator (#478)
Fixes#474
This bug was already present in stellaplayer. Obviously "effectNumber" must be checked, because "effectParameterX" just holds the "upper nibble" of effectParameter
- do channel mixing in 32bit, to avoid noise from over/underflow
- write audio output as "signed int" (not unsigned)
- add int16 saturation check ("clipping")
* avoid crash when MOD file has to many CHANNELS
- avoid guru meditation, by logging an error and refusing playback in case MOD.numberOfChannels > CHANNELS
// Downscale to BITDEPTH - a bit faster because the compiler can replaced division by constants with proper "right shift" + correct handling of sign bit
824
+
if (Mod.numberOfChannels <= 4) {
825
+
// up to 4 channels
826
+
sumL /= 4;
827
+
sumR /= 4;
828
+
} else {
829
+
if (Mod.numberOfChannels <= 6) {
830
+
// 5 or 6 channels - pre-multiply be 1.5, then divide by 8 -> same as division by 6
0 commit comments