User Manual first draft.
[Faustine.git] / interpreter / preprocessor / faust-0.9.47mr3 / architecture / module.cpp
1 /************************************************************************
2 ************************************************************************
3 FAUST Architecture File
4 Copyright (C) 2003-2011 GRAME, Centre National de Creation Musicale
5 ---------------------------------------------------------------------
6
7 This is sample code. This file is provided as an example of minimal
8 FAUST architecture file. Redistribution and use in source and binary
9 forms, with or without modification, in part or in full are permitted.
10 In particular you can create a derived work of this FAUST architecture
11 and distribute that work under terms of your choice.
12
13 This sample code is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 ************************************************************************
17 ************************************************************************/
18
19 #include <stdlib.h>
20 #include <stdio.h>
21 #include <string.h>
22 #include <limits.h>
23 #include <math.h>
24 #include <errno.h>
25 #include <time.h>
26
27 #include <map>
28 #include <list>
29
30 #include "gui/GUI.h"
31 #include "misc.h"
32 #include "audio/dsp.h"
33
34 using namespace std;
35
36 /******************************************************************************
37 *******************************************************************************
38
39 VECTOR INTRINSICS
40
41 *******************************************************************************
42 *******************************************************************************/
43
44 <<includeIntrinsic>>
45
46 //----------------------------------------------------------------
47 // Signal processor definition
48 //----------------------------------------------------------------
49
50 <<includeclass>>
51
52 extern "C" dsp* newDsp() { return new mydsp(); }
53 extern "C" void deleteDsp(dsp* self) { delete self; }
54
55 extern "C" int getNumInputs(dsp* self) { return self->getNumInputs(); }
56 extern "C" int getNumOutputs(dsp* self) { return self->getNumOutputs(); }
57 extern "C" void buildUserInterface(dsp* self,UI* interface) { self->buildUserInterface(interface); }
58 extern "C" void init(dsp* self, int freq) { self->init(freq); }
59 extern "C" void compute(dsp* self, int len, float** inputs, float** outputs) { self->compute(len, inputs, outputs); }