1 //-----------------------------------------------------
3 // Code generated with Faust 0.9.58 (http://faust.grame.fr)
4 //-----------------------------------------------------
6 #define FAUSTFLOAT float
9 typedef long double quad
;
13 #define FAUSTCLASS mydsp
16 class mydsp
: public dsp
{
22 static void metadata(Meta
* m
) {
25 virtual int getNumInputs() { return 0; }
26 virtual int getNumOutputs() { return 1; }
27 static void classInit(int samplingFreq
) {
29 virtual void instanceInit(int samplingFreq
) {
30 fSamplingFreq
= samplingFreq
;
31 for (int i
=0; i
<2; i
++) iVec0
[i
] = 0;
33 for (int i
=0; i
<2; i
++) fRec0
[i
] = 0;
35 virtual void init(int samplingFreq
) {
36 classInit(samplingFreq
);
37 instanceInit(samplingFreq
);
39 virtual void buildUserInterface(UI
* interface
) {
40 interface
->openVerticalBox("make_init");
41 interface
->closeBox();
43 virtual void compute (int count
, FAUSTFLOAT
** input
, FAUSTFLOAT
** output
) {
44 FAUSTFLOAT
* output0
= output
[0];
45 for (int i
=0; i
<count
; i
++) {
49 fRec0
[0] = (2.000001f
+ ((int(T0
))?fRec0
[1]:2));
50 output0
[i
] = (FAUSTFLOAT
)fRec0
[0];