Re: Float denormal automatically flushed to zero in CoreAudio?
Re: Float denormal automatically flushed to zero in CoreAudio?
- Subject: Re: Float denormal automatically flushed to zero in CoreAudio?
- From: James McCartney <email@hidden>
- Date: Wed, 25 Jun 2014 16:34:54 -0700
If you are using the AUBase C++ classes to build your AudioUnits, you will find the DISABLE_DENORMALS & RESTORE_DENORMALS macros in the code.
The HAL does not disable denormals, so it is only by luck if you are getting this mode in a HAL ioProc.
On Jun 20, 2014, at 5:01 AM, Stéphane Letz <email@hidden> wrote:
> Hi,
>
> It seems that the CoreAudio code already does "Float denormal automatically flushed to zero" kind to setting in the real-time thread before calling the application audio callback.
>
> We usually use the following AVOIDDENORMALS macro in our code for Intel processors, but this does not seem to be needed when audio code is run with CoreAudio on OSX.
>
>
> // On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
> // flags to avoid costly denormals
> #ifdef __SSE__
> #include <xmmintrin.h>
> #ifdef __SSE2__
> #define AVOIDDENORMALS _mm_setcsr(_mm_getcsr() | 0x8040)
> #else
> #define AVOIDDENORMALS _mm_setcsr(_mm_getcsr() | 0x8000)
> #endif
> #else
> #define AVOIDDENORMALS
> #endif
>
> Can someone confirm?
>
> Thanks.
>
> Stéphane Letz
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
James McCartney
Apple CoreAudio
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden