Initial import.
[Faustine.git] / dsp_files / test_complex_lib.24.tmp.cpp
1 //-----------------------------------------------------
2 //
3 // Code generated with Faust 0.9.58 (http://faust.grame.fr)
4 //-----------------------------------------------------
5 #ifndef FAUSTFLOAT
6 #define FAUSTFLOAT float
7 #endif
8
9 typedef long double quad;
10 /* link with */
11
12 #ifndef FAUSTCLASS
13 #define FAUSTCLASS mydsp
14 #endif
15
16 class mydsp : public dsp {
17 private:
18 public:
19 static void metadata(Meta* m) {
20 m->declare("music.lib/name", "Music Library");
21 m->declare("music.lib/author", "GRAME");
22 m->declare("music.lib/copyright", "GRAME");
23 m->declare("music.lib/version", "1.0");
24 m->declare("music.lib/license", "LGPL with exception");
25 m->declare("math.lib/name", "Math Library");
26 m->declare("math.lib/author", "GRAME");
27 m->declare("math.lib/copyright", "GRAME");
28 m->declare("math.lib/version", "1.0");
29 m->declare("math.lib/license", "LGPL with exception");
30 }
31
32 virtual int getNumInputs() { return 2; }
33 virtual int getNumOutputs() { return 1; }
34 static void classInit(int samplingFreq) {
35 }
36 virtual void instanceInit(int samplingFreq) {
37 fSamplingFreq = samplingFreq;
38 }
39 virtual void init(int samplingFreq) {
40 classInit(samplingFreq);
41 instanceInit(samplingFreq);
42 }
43 virtual void buildUserInterface(UI* interface) {
44 interface->openVerticalBox("untitled.24.tmp");
45 interface->closeBox();
46 }
47 virtual void compute (int count, FAUSTFLOAT** input, FAUSTFLOAT** output) {
48 FAUSTFLOAT* input0 = input[0];
49 FAUSTFLOAT* input1 = input[1];
50 FAUSTFLOAT* output0 = output[0];
51 for (int i=0; i<count; i++) {
52 output0[i] = (FAUSTFLOAT)((float)input0[i] + (float)input1[i]);
53 }
54 }
55 };
56
57