[linux-audio-user] Re: [linux-audio-dev] swh plugins and fixing undenormalize
Steve Harris
S.W.Harris at ecs.soton.ac.uk
Thu Jun 24 05:25:07 EDT 2004
On Thu, Jun 24, 2004 at 02:11:34AM -0300, Juan Linietsky wrote:
> #define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0)
> sample=0.0f
>
> however gcc 3.3 and 3.4 seem to produce an undesired effect
> when the optimizer is turned on, rendering this macro unusable..
> this breaks freeverb and a few other stuff I have that uses it.
It violates C99's pointer aliasing rules. I've posed a C99 friendly
version later in the thread.
Another point of differentiation between denomal hacks is tht this one
doesnt even analyse the potential denomal as a float, so you miss one
denomal operation that can occur with cleaner methods.
- Steve
More information about the Linux-audio-user
mailing list