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

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] swh plugins and fixing undenormalize
From: Juan Linietsky (coding_AT_reduz.com.ar)
Date: Thu Jun 24 2004 - 19:10:37 EEST


On Thursday 24 June 2004 06:21, Steve Harris wrote:
> On Thu, Jun 24, 2004 at 06:36:47 +1000, Erik de Castro Lopo wrote:
> > On Thu, 24 Jun 2004 10:37:35 +0100
> >
> > Simon Jenkins <sjenkins_AT_blueyonder.co.uk> wrote:
> > > inline float FlushToZero( volatile float f )
> > > {
> > > f += 9.8607615E-32f;
> > > return f - 9.8607615E-32f;
> > > }
> >
> > There we go!!! That is an elegant solution.
>
> Until the optimiser notices... but agreed its nicer. How much damage does
> it do if you change one of the constant values slightly? The DC offset
> would only occur at very low signals, so shouldn't affect feedback loops.
>
> - Steve

That actually looks nice... since thanks to writing "volatile float f",
the optimizer should not touch it.. it' the same thing than
when one accsses directly to the harware using pointers
to memmaped registers.. lack of using "volatile" often
ends up in non-working code..

cheers!

reduz


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jun 24 2004 - 19:04:11 EEST