Browse Source

Linux: set FPU rounding mode (zero)

pull/1639/head
bsp2 6 years ago
parent
commit
c562fb51b4
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/vst2_main.cpp

+ 5
- 0
src/vst2_main.cpp View File

@@ -147,6 +147,7 @@ struct PluginMutex {
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <fenv.h> // fesetround()


// #define _GNU_SOURCE // #define _GNU_SOURCE
#include <dlfcn.h> #include <dlfcn.h>
@@ -1190,6 +1191,10 @@ void VSTPluginProcessReplacingFloat32(VSTPlugin *vstPlugin,
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
#endif // HAVE_WINDOWS #endif // HAVE_WINDOWS


#ifdef YAC_LINUX
fesetround(FE_TOWARDZERO);
#endif // YAC_LINUX

sUI chIdx; sUI chIdx;


if(wrapper->b_idle) if(wrapper->b_idle)


Loading…
Cancel
Save