shithub: dumb

Download patch

ref: 1fe80f166e57778b1500bb035ec9ff8d95819006
parent: a869c4734a0df7a35b7616089db89cf64fcb3d80
author: Chris Moeller <kode54@gmail.com>
date: Sat May 4 17:08:17 EDT 2013

Fixed regular surround mixing

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -3957,7 +3957,7 @@
  
 	pan = apply_pan_envelope(playing);
 
-	if ((sigrenderer->n_channels >= 2) && (sigdata->flags & IT_STEREO) && (sigrenderer->n_channels == 3 && !IT_IS_SURROUND_SHIFTED(pan))) {
+	if ((sigrenderer->n_channels >= 2) && (sigdata->flags & IT_STEREO) && (sigrenderer->n_channels != 3 || !IT_IS_SURROUND_SHIFTED(pan))) {
 		span = (pan - (32<<8)) * sigdata->pan_separation * (1.0f / ((32<<8) * 128));
 		vol = 0.5f;
 		if (!IT_IS_SURROUND_SHIFTED(pan)) vol *= 1.0f - span;