\hypertarget{a00854_source}{}\doxysection{AAX\+\_\+\+Denormal.\+h}
\label{a00854_source}\index{AAX\_Denormal.h@{AAX\_Denormal.h}}
\mbox{\hyperlink{a00854}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00002\ \textcolor{comment}{/*}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ \ Copyright\ 2014-\/2016,\ 2019,\ 2021,\ 2023-\/2024\ Avid\ Technology,\ Inc.}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ \ All\ rights\ reserved.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ \ This\ file\ is\ part\ of\ the\ Avid\ AAX\ SDK.}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ \ The\ AAX\ SDK\ is\ subject\ to\ commercial\ or\ open-\/source\ licensing.}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ \ By\ using\ the\ AAX\ SDK,\ you\ agree\ to\ the\ terms\ of\ both\ the\ Avid\ AAX\ SDK\ License}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *\ \ Agreement\ and\ Avid\ Privacy\ Policy.}}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ \ AAX\ SDK\ License:\ https://developer.avid.com/aax}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ \ Privacy\ Policy:\ https://www.avid.com/legal/privacy-\/policy-\/statement}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ \ Or:\ You\ may\ also\ use\ this\ code\ under\ the\ terms\ of\ the\ GPL\ v3\ (see}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *\ \ www.gnu.org/licenses).}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ \ THE\ AAX\ SDK\ IS\ PROVIDED\ "{}AS\ IS"{}\ WITHOUT\ ANY\ WARRANTY,\ AND\ ALL\ WARRANTIES,\ WHETHER}}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ \ EXPRESSED\ OR\ IMPLIED,\ INCLUDING\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ PURPOSE,\ ARE}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *\ \ DISCLAIMED.}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00030\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00031\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ \textcolor{preprocessor}{\#ifndef\ AAX\_DENORMAL\_H}}
\DoxyCodeLine{00034\ \textcolor{preprocessor}{\#define\ AAX\_DENORMAL\_H}}
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ }
\DoxyCodeLine{00037\ \textcolor{comment}{//\ AAX\ Includes}}
\DoxyCodeLine{00038\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00542}{AAX.h}}"{}}}
\DoxyCodeLine{00039\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00845}{AAX\_PlatformOptimizationConstants.h}}"{}}}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#if\ !\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00043\ \textcolor{preprocessor}{\#include\ <limits>}}
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#include\ <math.h>}}
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ !\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00046\ }
\DoxyCodeLine{00047\ }
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00066\ \textcolor{preprocessor}{\#if\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00067\ }
\DoxyCodeLine{00068\ \textcolor{comment}{//\ TODO:\ Currently\ noop\ on\ TI}}
\DoxyCodeLine{00069\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00070\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \textcolor{preprocessor}{\#elif\ ((defined\ \_MSC\_VER)\ ||\ defined(WINDOWS\_VERSION))}}
\DoxyCodeLine{00073\ \textcolor{comment}{//\ Visual\ Studio}}
\DoxyCodeLine{00074\ }
\DoxyCodeLine{00075\ \textcolor{comment}{//\ Note:\ In\ Pro\ Tools\ 11\ and\ higher\ for\ Windows,\ DAZ\ is\ turned\ on\ for\ all\ plug-\/in\ processing\ threads}}
\DoxyCodeLine{00076\ }
\DoxyCodeLine{00077\ \textcolor{comment}{//\ FIXME:\ These\ macros\ are\ currently\ noop\ on\ Windows\ because\ of\ compiler\ problems\ when\ intrin.h\ is\ included.\ Investigate\ using\ \_controlfp(\_DN\_FLUSH,\ \_MCW\_DN)\ instead}}
\DoxyCodeLine{00078\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00079\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00080\ \textcolor{comment}{//\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ AAX\_StDenormalAsZeroFlagsOff\ computeDenormalFlagsScope\ \#\#\ \_\_LINE\_\_\ ;\ do\ \{\}\ while\ (0)}}
\DoxyCodeLine{00081\ \textcolor{comment}{//\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ AAX\_StDenormalAsZeroFlagsOn\ denormalAsZeroFlagsScope\ \#\#\ \_\_LINE\_\_\ ;\ do\ \{\}\ while\ (0)}}
\DoxyCodeLine{00082\ \textcolor{comment}{//}}
\DoxyCodeLine{00083\ \textcolor{comment}{//\#include\ <Windows.h>}}
\DoxyCodeLine{00084\ \textcolor{comment}{//\#include\ <mmintrin.h>}}
\DoxyCodeLine{00085\ \textcolor{comment}{//}}
\DoxyCodeLine{00091\ \textcolor{comment}{}\textcolor{comment}{//const\ unsigned\ gMXCSRFlags\_DAZFZ\ =\ 0x00008040;}}
\DoxyCodeLine{00092\ \textcolor{comment}{//}}
\DoxyCodeLine{00094\ \textcolor{comment}{}\textcolor{comment}{//struct\ AAX\_StDenormalAsZeroFlagsOn}}
\DoxyCodeLine{00095\ \textcolor{comment}{//\{}}
\DoxyCodeLine{00096\ \textcolor{comment}{//public:}}
\DoxyCodeLine{00097\ \textcolor{comment}{//\ \ AAX\_StDenormalAsZeroFlagsOn()}}
\DoxyCodeLine{00098\ \textcolor{comment}{//\ \ :\ mSSESupported(IsProcessorFeaturePresent(PF\_XMMI\_INSTRUCTIONS\_AVAILABLE))}}
\DoxyCodeLine{00099\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00100\ \textcolor{comment}{//\ \ \ \ \ \ if\ (mSSESupported)\ \{\ set\_flags();\ \}}}
\DoxyCodeLine{00101\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00102\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00103\ \textcolor{comment}{//\ \ \string~AAX\_StDenormalAsZeroFlagsOn()}}
\DoxyCodeLine{00104\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00105\ \textcolor{comment}{//\ \ \ \ \ \ if\ (mSSESupported)\ \{\ reset\_flags();\ \}}}
\DoxyCodeLine{00106\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00107\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00108\ \textcolor{comment}{//private:}}
\DoxyCodeLine{00109\ \textcolor{comment}{//\ \ void\ set\_flags()}}
\DoxyCodeLine{00110\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00111\ \textcolor{comment}{//\ \ \ \ \ \ mPrevFlags\ =\ \_mm\_getcsr();}}
\DoxyCodeLine{00112\ \textcolor{comment}{//\ \ \ \ \ \ unsigned\ newFlags\ =\ mPrevFlags\ |\ gMXCSRFlags\_DAZFZ;}}
\DoxyCodeLine{00113\ \textcolor{comment}{//\ \ \ \ \ \ \_mm\_setcsr(newFlags);}}
\DoxyCodeLine{00114\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00115\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00116\ \textcolor{comment}{//\ \ void\ reset\_flags()}}
\DoxyCodeLine{00117\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00118\ \textcolor{comment}{//\ \ \ \ \ \ \_mm\_setcsr(mPrevFlags);}}
\DoxyCodeLine{00119\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00120\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00121\ \textcolor{comment}{//\ \ unsigned\ mPrevFlags;}}
\DoxyCodeLine{00122\ \textcolor{comment}{//\ \ const\ bool\ mSSESupported;}}
\DoxyCodeLine{00123\ \textcolor{comment}{//\};}}
\DoxyCodeLine{00124\ \textcolor{comment}{//}}
\DoxyCodeLine{00126\ \textcolor{comment}{}\textcolor{comment}{//struct\ AAX\_StDenormalAsZeroFlagsOff}}
\DoxyCodeLine{00127\ \textcolor{comment}{//\{}}
\DoxyCodeLine{00128\ \textcolor{comment}{//public:}}
\DoxyCodeLine{00129\ \textcolor{comment}{//\ \ AAX\_StDenormalAsZeroFlagsOff()}}
\DoxyCodeLine{00130\ \textcolor{comment}{//\ \ :\ mSSESupported(IsProcessorFeaturePresent(PF\_XMMI\_INSTRUCTIONS\_AVAILABLE))}}
\DoxyCodeLine{00131\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00132\ \textcolor{comment}{//\ \ \ \ \ \ if\ (mSSESupported)\ \{\ set\_flags();\ \}}}
\DoxyCodeLine{00133\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00134\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00135\ \textcolor{comment}{//\ \ \string~AAX\_StDenormalAsZeroFlagsOff()}}
\DoxyCodeLine{00136\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00137\ \textcolor{comment}{//\ \ \ \ \ \ if\ (mSSESupported)\ \{\ reset\_flags();\ \}}}
\DoxyCodeLine{00138\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00139\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00140\ \textcolor{comment}{//private:}}
\DoxyCodeLine{00141\ \textcolor{comment}{//\ \ void\ set\_flags()}}
\DoxyCodeLine{00142\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00143\ \textcolor{comment}{//\ \ \ \ \ \ mPrevFlags\ =\ \_mm\_getcsr();}}
\DoxyCodeLine{00144\ \textcolor{comment}{//\ \ \ \ \ \ unsigned\ newFlags\ =\ mPrevFlags\ \&\ (\string~gMXCSRFlags\_DAZFZ);}}
\DoxyCodeLine{00145\ \textcolor{comment}{//\ \ \ \ \ \ \_mm\_setcsr(newFlags);}}
\DoxyCodeLine{00146\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00147\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00148\ \textcolor{comment}{//\ \ void\ reset\_flags()}}
\DoxyCodeLine{00149\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00150\ \textcolor{comment}{//\ \ \ \ \ \ \_mm\_setcsr(mPrevFlags);}}
\DoxyCodeLine{00151\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00152\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00153\ \textcolor{comment}{//\ \ unsigned\ mPrevFlags;}}
\DoxyCodeLine{00154\ \textcolor{comment}{//\ \ const\ bool\ mSSESupported;}}
\DoxyCodeLine{00155\ \textcolor{comment}{//\};}}
\DoxyCodeLine{00156\ }
\DoxyCodeLine{00157\ }
\DoxyCodeLine{00158\ \textcolor{preprocessor}{\#elif\ defined(\_\_linux\_\_)}}
\DoxyCodeLine{00159\ \textcolor{comment}{//\ Linux}}
\DoxyCodeLine{00160\ }
\DoxyCodeLine{00161\ \textcolor{comment}{//\ TODO:\ Currently\ noop\ on\ Linux}}
\DoxyCodeLine{00162\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00163\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00164\ }
\DoxyCodeLine{00165\ \textcolor{preprocessor}{\#elif\ (defined\ (\_\_GNUC\_\_)\ ||\ defined(MAC\_VERSION))}}
\DoxyCodeLine{00166\ \textcolor{comment}{//\ GCC\ /\ macOS}}
\DoxyCodeLine{00167\ }
\DoxyCodeLine{00168\ \textcolor{comment}{//\ Note:\ In\ Pro\ Tools\ 11\ through\ Pro\ Tools\ 12.6\ on\ macOS,\ DAZ\ is\ turned\ off\ for\ all\ plug-\/in\ processing\ threads}}
\DoxyCodeLine{00169\ }
\DoxyCodeLine{00170\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ AAX\_StDenormalAsZeroFlagsOff\ computeDenormalFlagsScope\ \#\#\ \_\_LINE\_\_\ ;\ do\ \{\}\ while\ (0)}}
\DoxyCodeLine{00171\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ AAX\_StDenormalAsZeroFlagsOn\ denormalAsZeroFlagsScope\ \#\#\ \_\_LINE\_\_\ ;\ do\ \{\}\ while\ (0)}}
\DoxyCodeLine{00172\ }
\DoxyCodeLine{00173\ \textcolor{preprocessor}{\#include\ <fenv.h>}}
\DoxyCodeLine{00174\ \textcolor{keyword}{struct\ }AAX\_StDenormalAsZeroFlagsOn}
\DoxyCodeLine{00175\ \{}
\DoxyCodeLine{00176\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00177\ \ \ \ \ AAX\_StDenormalAsZeroFlagsOn()\ \{\ set\_flags();\ \}}
\DoxyCodeLine{00178\ \ \ \ \ \string~AAX\_StDenormalAsZeroFlagsOn()\ \{\ reset\_flags();\ \}}
\DoxyCodeLine{00179\ \ \ \ \ }
\DoxyCodeLine{00180\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00181\ \textcolor{preprocessor}{\#if\ !defined(\_\_arm64\_\_)}}
\DoxyCodeLine{00182\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_flags()\ \{\ fegetenv(\&mPrevFlags);\ fesetenv(FE\_DFL\_DISABLE\_SSE\_DENORMS\_ENV);\ \}}
\DoxyCodeLine{00183\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00184\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_flags()\ \{\ fegetenv(\&mPrevFlags);\ fesetenv(FE\_DFL\_DISABLE\_DENORMS\_ENV);\ \}}
\DoxyCodeLine{00185\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00186\ \ \ \ \ \textcolor{keywordtype}{void}\ reset\_flags()\ \{\ fesetenv(\&mPrevFlags);\ \}}
\DoxyCodeLine{00187\ \ \ \ \ fenv\_t\ mPrevFlags;}
\DoxyCodeLine{00188\ \};}
\DoxyCodeLine{00189\ \textcolor{keyword}{struct\ }AAX\_StDenormalAsZeroFlagsOff}
\DoxyCodeLine{00190\ \{}
\DoxyCodeLine{00191\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00192\ \ \ \ \ AAX\_StDenormalAsZeroFlagsOff()\ \{\ set\_flags();\ \}}
\DoxyCodeLine{00193\ \ \ \ \ \string~AAX\_StDenormalAsZeroFlagsOff()\ \{\ reset\_flags();\ \}}
\DoxyCodeLine{00194\ \ \ \ \ }
\DoxyCodeLine{00195\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00196\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_flags()\ \{\ fegetenv(\&mPrevFlags);\ fesetenv(FE\_DFL\_ENV);\ \}\ \textcolor{comment}{//\ assuming\ that\ FE\_DFL\_ENV\ are\ the\ flags\ that\ we\ want\ here}}
\DoxyCodeLine{00197\ \ \ \ \ \textcolor{keywordtype}{void}\ reset\_flags()\ \{\ fesetenv(\&mPrevFlags);\ \}}
\DoxyCodeLine{00198\ \ \ \ \ fenv\_t\ mPrevFlags;}
\DoxyCodeLine{00199\ \};}
\DoxyCodeLine{00200\ }
\DoxyCodeLine{00201\ }
\DoxyCodeLine{00202\ }
\DoxyCodeLine{00203\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00204\ }
\DoxyCodeLine{00205\ \textcolor{preprocessor}{\#error\ AAX\_SCOPE\_COMPUTE\_DENORMALS\ is\ not\ defined\ for\ this\ compiler}}
\DoxyCodeLine{00206\ \textcolor{preprocessor}{\#error\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO\ is\ not\ defined\ for\ this\ compiler}}
\DoxyCodeLine{00207\ }
\DoxyCodeLine{00208\ \textcolor{comment}{//\ Just\ for\ Doxygen}}
\DoxyCodeLine{00209\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00210\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00211\ }
\DoxyCodeLine{00212\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ End\ compiler\ selection\ for\ AAX\_SCOPE\_COMPUTE\_DENORMALS\ /\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO\ definition}}
\DoxyCodeLine{00213\ }
\DoxyCodeLine{00214\ }
\DoxyCodeLine{00215\ }
\DoxyCodeLine{00216\ }
\DoxyCodeLine{00217\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{a00948}{AAX}}}
\DoxyCodeLine{00218\ \{}
\DoxyCodeLine{00219\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{a00948_a5c2e1bff2891a4b11252759e152cf520}{cDenormalAvoidanceOffset}}=3.0e-\/34;}
\DoxyCodeLine{00220\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ \mbox{\hyperlink{a00948_ae3a66eee97cfe006ffbf11f901ddd286}{cFloatDenormalAvoidanceOffset}}=3.0e-\/20f;\ \ \ \ \textcolor{comment}{//This\ number\ is\ emprically\ derived\ with\ minimal\ trial\ and\ error.}}
\DoxyCodeLine{00221\ }
\DoxyCodeLine{00222\ \textcolor{preprocessor}{\#if\ !\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00223\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ cMinimumNormalFloat\ =\ std::numeric\_limits<float>::min();}
\DoxyCodeLine{00224\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00225\ \ \ \ \ }
\DoxyCodeLine{00235\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a00948_aaf103dc75b68b6c4f6792dd26f9b4fd0}{DeDenormal}}(\textcolor{keywordtype}{double}\ \&iValue)}
\DoxyCodeLine{00236\ \ \ \ \ \{}
\DoxyCodeLine{00237\ \textcolor{preprocessor}{\#if\ defined(WINDOWS\_VERSION)\ ||\ defined(MAC\_VERSION)\ ||\ defined(LINUX\_VERSION)}}
\DoxyCodeLine{00238\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(iValue\ <\ cDenormalAvoidanceOffset\ \&\&\ iValue\ >\ -\/\mbox{\hyperlink{a00948_a5c2e1bff2891a4b11252759e152cf520}{cDenormalAvoidanceOffset}})\ iValue=0.0;}
\DoxyCodeLine{00239\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00240\ \ \ \ \ \}}
\DoxyCodeLine{00241\ \ \ \ \ }
\DoxyCodeLine{00244\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a00948_aaf103dc75b68b6c4f6792dd26f9b4fd0}{DeDenormal}}(\textcolor{keywordtype}{float}\ \&iValue)}
\DoxyCodeLine{00245\ \ \ \ \ \{}
\DoxyCodeLine{00246\ \textcolor{preprocessor}{\#if\ defined(WINDOWS\_VERSION)\ ||\ defined(MAC\_VERSION)\ ||\ defined(LINUX\_VERSION)}}
\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(iValue\ <\ cFloatDenormalAvoidanceOffset\ \&\&\ iValue\ >\ -\/\mbox{\hyperlink{a00948_ae3a66eee97cfe006ffbf11f901ddd286}{cFloatDenormalAvoidanceOffset}})\ iValue=0.0f;}
\DoxyCodeLine{00248\ \textcolor{preprocessor}{\#endif\ }}
\DoxyCodeLine{00249\ \ \ \ \ \}}
\DoxyCodeLine{00250\ \ \ \ \ }
\DoxyCodeLine{00251\ \textcolor{preprocessor}{\#if\ AAX\_CPP11\_SUPPORT}}
\DoxyCodeLine{00254\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{float}\ \mbox{\hyperlink{a00948_aaf103dc75b68b6c4f6792dd26f9b4fd0}{DeDenormal}}(\textcolor{keywordtype}{float}\ \&\&iValue)}
\DoxyCodeLine{00255\ \ \ \ \ \{}
\DoxyCodeLine{00256\ \textcolor{preprocessor}{\#if\ defined(WINDOWS\_VERSION)\ ||\ defined(MAC\_VERSION)\ ||\ defined(LINUX\_VERSION)}}
\DoxyCodeLine{00257\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (iValue\ <\ cFloatDenormalAvoidanceOffset\ \&\&\ iValue\ >\ -\/\mbox{\hyperlink{a00948_ae3a66eee97cfe006ffbf11f901ddd286}{cFloatDenormalAvoidanceOffset}})\ ?\ 0.f\ :\ iValue;}
\DoxyCodeLine{00258\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00259\ \ \ \ \ \}}
\DoxyCodeLine{00260\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ AAX\_CPP11\_SUPPORT}}
\DoxyCodeLine{00261\ \ \ \ \ }
\DoxyCodeLine{00266\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a00948_ac52b6214a1de32e59b90ddbc1878e515}{DeDenormalFine}}(\textcolor{keywordtype}{float}\ \&iValue)}
\DoxyCodeLine{00267\ \ \ \ \ \{}
\DoxyCodeLine{00268\ \textcolor{preprocessor}{\#if\ !\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00269\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(iValue\ <\ cMinimumNormalFloat\ \&\&\ iValue\ >\ -\/cMinimumNormalFloat)\ iValue=0.0f;}
\DoxyCodeLine{00270\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00271\ \ \ \ \ \}}
\DoxyCodeLine{00272\ \ \ \ \ }
\DoxyCodeLine{00283\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a00948_a73dd9a17abecc28625c4d34279e4534f}{FilterDenormals}}(\textcolor{keywordtype}{float}*\ inSamples,\ int32\_t\ inLength)}
\DoxyCodeLine{00284\ \ \ \ \ \{}
\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \textcolor{comment}{//TODO:\ Implement\ optimized\ versions\ for\ TI\ and\ SSE}}
\DoxyCodeLine{00286\ \textcolor{preprocessor}{\#if\ !\ defined(\ \_TMS320C6X\ )\ }\textcolor{comment}{//\ Not\ yet\ implemented\ for\ TI}}
\DoxyCodeLine{00287\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}(\ int32\_t\ i\ =\ 0;\ i\ <\ inLength;\ ++i\ )}
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ curFloat\ =\ *inSamples;}
\DoxyCodeLine{00290\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(\ \mbox{\hyperlink{a00948_a7fc4d4cd59850b8b875d085467ff5850}{fabsf}}(curFloat)\ <\ cMinimumNormalFloat\ )}
\DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ curFloat\ =\ 0.0f;}
\DoxyCodeLine{00292\ \ \ \ \ \ \ \ \ \ \ \ \ *(inSamples++)\ =\ curFloat;}
\DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00294\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00295\ \ \ \ \ \}}
\DoxyCodeLine{00296\ }
\DoxyCodeLine{00297\ \}\ \textcolor{comment}{//\ namespace\ AAX}}
\DoxyCodeLine{00298\ }
\DoxyCodeLine{00299\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ AAX\_QUANTIZE\_H}}

\end{DoxyCode}
