diff --git a/include/MixerWorkerThread.h b/include/MixerWorkerThread.h index d1ebc73eb..51da6a91e 100644 --- a/include/MixerWorkerThread.h +++ b/include/MixerWorkerThread.h @@ -22,8 +22,8 @@ * */ -#ifndef _MIXER_WORKER_THREAD_H -#define _MIXER_WORKER_THREAD_H +#ifndef MIXER_WORKER_THREAD_H +#define MIXER_WORKER_THREAD_H #include #include diff --git a/src/core/main.cpp b/src/core/main.cpp index f65ca98c8..1249c57b6 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -27,6 +27,14 @@ #include "lmmsversion.h" #include "versioninfo.h" +// denormals stripping +#ifdef __SSE__ +#include +#endif +#ifdef __SSE3__ +#include +#endif + #include #include #include @@ -92,6 +100,16 @@ int main( int argc, char * * argv ) // intialize RNG srand( getpid() + time( 0 ) ); + // set denormal protection for this thread + #ifdef __SSE3__ + /* DAZ flag */ + _MM_SET_DENORMALS_ZERO_MODE( _MM_DENORMALS_ZERO_ON ); + #endif + #ifdef __SSE__ + /* FTZ flag */ + _MM_SET_FLUSH_ZERO_MODE( _MM_FLUSH_ZERO_ON ); + #endif + bool core_only = false; bool fullscreen = true; bool exit_after_import = false;