[linux-audio-user] Re: [linux-audio-dev] swh plugins and fixing undenormalize

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux