| 1 | |
| 2 | /****************************************************************************** |
| 3 | ******************************************************************************* |
| 4 | |
| 5 | FAUST DSP |
| 6 | |
| 7 | ******************************************************************************* |
| 8 | *******************************************************************************/ |
| 9 | |
| 10 | #ifndef __dsp__cxx . . $ `audio/faudiostream/architecture/faust/audio/dsp.h:11:9`! |
| 11 | #define __dsp__cxx . . $ `faudiostream/architecture/faust/audio/dsp.h:11:9`! |
| 12 | |
| 13 | #ifndef FAUSTFLOATcxx . . $ `faudiostream/architecture/faust/gui/UI.h:5:9`! |
| 14 | #define FAUSTFLOAT float |
| 15 | #endif |
| 16 | |
| 17 | class UIcxx . . $ UI#; |
| 18 | |
| 19 | //---------------------------------------------------------------- |
| 20 | // signal processor definition |
| 21 | //---------------------------------------------------------------- |
| 22 | |
| 23 | class dspcxx . . $ dsp# { |
| 24 | protected: |
| 25 | int fSamplingFreqcxx . . $ dsp#fSamplingFreq.; |
| 26 | public: |
| 27 | dspcxx . . $ dsp#dsp(49f6e7a06ebc5aa8).() {} |
| 28 | virtual ~cxx . . $ dsp#`~dsp`(ced63f7c635d850d).dspcxx . . $ dsp#() {} |
| 29 | |
| 30 | virtual int getNumInputscxx . . $ dsp#getNumInputs(b126dc7c1de90089).() = 0; |
| 31 | virtual int getNumOutputscxx . . $ dsp#getNumOutputs(b126dc7c1de90089).() = 0; |
| 32 | virtual void buildUserInterfacecxx . . $ dsp#buildUserInterface(c644848e20fbf927).(UIcxx . . $ UI#* interface) = 0; |
| 33 | virtual void initcxx . . $ dsp#init(d4f767463ce0a6b3).(int samplingRate) = 0; |
| 34 | virtual void instanceInitcxx . . $ dsp#instanceInit(d4f767463ce0a6b3).(int samplingFreq) = 0; |
| 35 | virtual void computecxx . . $ dsp#compute(4254ec6c518224ca).(int len, FAUSTFLOATcxx . . $ `faudiostream/architecture/faust/gui/UI.h:5:9`!** inputs, FAUSTFLOATcxx . . $ `faudiostream/architecture/faust/gui/UI.h:5:9`!** outputs) = 0; |
| 36 | }; |
| 37 | |
| 38 | // On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero) |
| 39 | // flags to avoid costly denormals |
| 40 | #ifdef __SSE__cxx . . $ `<built-in>:453:9`! |
| 41 | #include <xmmintrin.h> |
| 42 | #ifdef __SSE2__cxx . . $ `<built-in>:451:9`! |
| 43 | #define AVOIDDENORMALScxx . . $ `faudiostream/architecture/faust/audio/dsp.h:43:17`! _mm_setcsr(_mm_getcsr() | 0x8040) |
| 44 | #else |
| 45 | #define AVOIDDENORMALS _mm_setcsr(_mm_getcsr() | 0x8000) |
| 46 | #endif |
| 47 | #else |
| 48 | #define AVOIDDENORMALS |
| 49 | #endif |
| 50 | |
| 51 | #endif |