Strip denormals

This commit is contained in:
Vesa
2014-11-14 20:43:49 +02:00
parent 87003ee84c
commit 16302fc4ab
2 changed files with 16 additions and 0 deletions

View File

@@ -31,6 +31,12 @@
#include "ThreadableJob.h"
#include "Mixer.h"
#ifdef __SSE__
#include <xmmintrin.h>
#endif
#ifdef __SSE3__
#include <pmmintrin.h>
#endif
class MixerWorkerThread : public QThread
{

View File

@@ -101,6 +101,16 @@ MixerWorkerThread::MixerWorkerThread( Mixer* mixer ) :
m_workingBuf( new sampleFrame[mixer->framesPerPeriod()] ),
m_quit( false )
{
// 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
// initialize global static data
if( queueReadyWaitCond == NULL )
{