From e14ce9aff965aabd8152e68a7c0200992752895e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petri=20J=C3=A4rvisalo?= Date: Wed, 24 Jul 2024 19:00:16 +0300 Subject: [PATCH] fix for sointu --- sointu_templates/effects.asm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sointu_templates/effects.asm b/sointu_templates/effects.asm index 6d7d371..747331f 100644 --- a/sointu_templates/effects.asm +++ b/sointu_templates/effects.asm @@ -156,6 +156,9 @@ su_op_dbgain_mono: fsubp st2, st0 ; r x-l' fmul dword [{{.WRK}}+8] ; r*b x-l' fsubp st1, st0 ; x-l'-r*b + {{- .Float 0.5 | .Prepare | indent 4}} + fadd dword [{{.Float 0.5 | .Use}}] ; add and sub small offset to prevent denormalization + fsub dword [{{.Float 0.5 | .Use}}] ; See for example: https://stackoverflow.com/questions/36781881/why-denormalized-floats-are-so-much-slower-than-other-floats-from-hardware-arch fst dword [{{.WRK}}+4] ; h'=x-l'-r*b fmul dword [{{.WRK}}+12] ; f2*h' fadd dword [{{.WRK}}+8] ; f2*h'+b