faust icon indicating copy to clipboard operation
faust copied to clipboard

Wrong FAUSTFLOAT in UI ?

Open jcelerier opened this issue 3 years ago • 3 comments

Here: https://github.com/grame-cncm/faust/blob/13def69f21dd0cede393c13dcaf1a6fe7ef7f439/architecture/faust/gui/UI.h#L78

Shouldn't it be sizeof(REAL) instead ? as it seems that sometimes the faust compiler uses that class internally (and thus it would use the default FAUSTFLOAT=float define)

jcelerier avatar Aug 22 '22 20:08 jcelerier

I think that there are other leaks of FAUSTFLOAT: with piano.dsp from STK I have to recompile the faust compiler itself with -DFAUSTFLOAT=double otherwise I get a call from a JSONUIDecoder<float> at some point (where my code is build with FAUSTFLOAT=double, which breaks things).

To make sure I have added

static_assert(sizeof(FAUSTFLOAT) == sizeof(double));

at the top of every single of my faust-related .cpp's and it compiles fine, yet I'm still getting issues...

it seems to be because of JSONUIDecoder used in poly_dsp / proxy_dsp: image

image

jcelerier avatar Aug 22 '22 21:08 jcelerier

This is what I see instead if I recompile libfaust by passing an explicit FAUSTFLOAT=double to CMAKE_CXX_FLAGS:

image

jcelerier avatar Aug 22 '22 21:08 jcelerier

hmm and #include "faust/gui/JSONUIDecoder.h" is included and used in llvm_dsp_aux.cpp ; maybe this causes some symbol collision ?

jcelerier avatar Aug 22 '22 21:08 jcelerier