[PlanetCCRMA] Fixing Freeverb and Denormals

Steve Harris S.W.Harris@ecs.soton.ac.uk
Sat Jan 22 08:44:02 2005


On Fri, Jan 21, 2005 at 05:21:24 +0000, Neil Klepeis wrote:
> Anyway, I then tried using something like the following....but still no 
> good, [ardour now doesn't zombify, it's just that freeverb sounds like 
> @$!&].
> 
> #define static inline float undenormalise(volatile float s) { s += 
> 9.8607615E-32f; return s - 9.8607615E-32f; }

You need to loose the #define, it should read:

static inline float undenormalise(volatile float s)
{
	s += 9.8607615E-32f;
	return s - 9.8607615E-32f;
}

For something like a reverb the best option is going to be to build with
SSE maths and call the function I posed here a week ago or so. There are
so many places where denormals can occur in reverbs that youre going to
burn a load of CPU trying to kill them.

OTOH I'm not sure how that function would interact with the host when
loaded as a plugin :(

- Steve