How about *not* calling RESTORE_DENORMALS as a courtesy for the rest of the audio processing chain?
> On 10 Mar 2017, at 10:28 , Philippe Wicker <pwic...@mac.com> wrote: > > Yes, it is done that way in the Apple AudioUnit SDK. The code calls > DISABLE_DENORMALS at the beginning of the render routine, and > RESTORE_DENORMALS at the end. Those macros call asm instruction stmxcsr and > ldmxcsr (in AUBase.cpp: line 53). >> On 10 Mar 2017, at 10:17, Stefan Stenzel <stefan.sten...@waldorfmusic.de> >> wrote: >> >> I don’t get it - what prevents you from checking/setting DAZ/FTZ in your >> processing routine? >> >> >>> On 10 Mar 2017, at 10:10 , Richard Dobson <rich...@rwdobson.com> wrote: >>> >>> This might not be possible if one is implementing e.g. a plugin to run in a >>> third-party host - where one does not have full control over the host, nor >>> indeed of fellow plugins. Whereas adding some ~very~ low level TPDF dither >>> to a signal should be close to minimum cost. >>> >>> Richard Dobson >>> >>> On 10/03/2017 08:29, Stefan Stenzel wrote: >>>> That document is from 2002 - today all these suggestions make little >>>> sense unless you want your code to run explicitly on a CPU without >>>> SSE. The best strategy for avoiding denormals is to enforce the >>>> compiler to use SSE and avoid the FPU, then set the >>>> Denormals-Are-Zero (DAZ) and Flush-To-Zero (FTZ) flag in the SSE >>>> status register. >>>> >>>> Stefan >>>> >>>> >>> _______________________________________________ >>> dupswapdrop: music-dsp mailing list >>> music-dsp@music.columbia.edu >>> https://lists.columbia.edu/mailman/listinfo/music-dsp >>> >> >> _______________________________________________ >> dupswapdrop: music-dsp mailing list >> music-dsp@music.columbia.edu >> https://lists.columbia.edu/mailman/listinfo/music-dsp > > _______________________________________________ > dupswapdrop: music-dsp mailing list > music-dsp@music.columbia.edu > https://lists.columbia.edu/mailman/listinfo/music-dsp _______________________________________________ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp