Add denormal protection to Fifowriter thread
This commit is contained in:
@@ -25,6 +25,14 @@
|
||||
#ifndef _MIXER_H
|
||||
#define _MIXER_H
|
||||
|
||||
// denormals stripping
|
||||
#ifdef __SSE__
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#ifdef __SSE3__
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#ifndef LMMS_USE_3RDPARTY_LIBSRC
|
||||
|
||||
@@ -902,6 +902,15 @@ Mixer::fifoWriter::fifoWriter( Mixer* mixer, fifo * _fifo ) :
|
||||
m_fifo( _fifo ),
|
||||
m_writing( true )
|
||||
{
|
||||
// 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
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user