// let's do a simple limiter instead, seems to sound better
static float maxvol = 0;
maxvol = max(1.0f, maxvol * (1.0f - nbframes / (0.4f * snd_renderbuffer->format.speed)));
-#define SOFTCLIP(x) if((x)>maxvol) maxvol=(x); (x) /= maxvol;
+#define SOFTCLIP(x) if(fabs(x)>maxvol) maxvol=fabs(x); (x) /= maxvol;
portable_sampleframe_t *p = painted_ptr;
if (channels == 8) // 7.1 surround