Skip to content

Commit

Permalink
faust: enable denormals when compiling faust code
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Feb 6, 2025
1 parent f792f12 commit ea09d07
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion src/plugins/score-plugin-faust/Faust/EffectModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

#include <ossia/dataflow/execution_state.hpp>
#include <ossia/dataflow/nodes/faust/faust_node.hpp>
#include <ossia/detail/disable_fpe.hpp>

#include <boost/predef.h>

#include <QDialog>
#include <QDialogButtonBox>
Expand All @@ -29,7 +32,9 @@
#include <Faust/Commands.hpp>
#include <Faust/Descriptor.hpp>
#include <Faust/Utils.hpp>

#if BOOST_ARCH_X86
#include <xmmintrin.h>
#endif
#include <wobjectimpl.h>

#if __has_include(<sndfile.h>)
Expand Down Expand Up @@ -301,9 +306,16 @@ Process::ScriptChangeResult FaustEffectModel::reload()
err.resize(4097);
llvm_dsp_factory* fac{};

#if BOOST_ARCH_X86
// https://github.com/grame-cncm/faust/issues/1117
_mm_setcsr(_MM_MASK_MASK | _MM_FLUSH_ZERO_OFF);
#endif

fac = createDSPFactoryFromString(
"score", str, argv.size(), argv.data(), triple, err, -1);

ossia::disable_fpe();

if(err[0] != 0)
{
errorMessage(0, QString::fromStdString(err));
Expand Down

0 comments on commit ea09d07

Please sign in to comment.