Browse Source

Linux: set FPU rounding mode (zero)

pull/1639/head
bsp2 6 years ago
parent
commit
04ed890ca8
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/engine.cpp

+ 7
- 0
src/engine.cpp View File

@@ -17,6 +17,9 @@
#include "global.hpp"
#include "global_ui.hpp"

#ifdef __GNUC__
#include <fenv.h>
#endif

namespace rack {

@@ -121,6 +124,10 @@ static void engineRun() {
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
#endif // _MSC_VER

#if defined(__GNUC__) && (defined(ARCH_X64) || defined(ARCH_X86))
::fesetround(FE_TOWARDZERO);
#endif // __GNUC__

// Every time the engine waits and locks a mutex, it steps this many frames
const int mutexSteps = 64;
// Time in seconds that the engine is rushing ahead of the estimated clock time


Loading…
Cancel
Save