Makefile and configure cleaning (configure is no more needed).
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / architecture / jack-console.cpp
1 /************************************************************************
2
3 IMPORTANT NOTE : this file contains two clearly delimited sections :
4 the ARCHITECTURE section (in two parts) and the USER section. Each section
5 is governed by its own copyright and license. Please check individually
6 each section for license and copyright information.
7 *************************************************************************/
8
9 /*******************BEGIN ARCHITECTURE SECTION (part 1/2)****************/
10
11 /************************************************************************
12 FAUST Architecture File
13 Copyright (C) 2003-2011 GRAME, Centre National de Creation Musicale
14 ---------------------------------------------------------------------
15 This Architecture section is free software; you can redistribute it
16 and/or modify it under the terms of the GNU General Public License
17 as published by the Free Software Foundation; either version 3 of
18 the License, or (at your option) any later version.
19
20 This program is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with this program; If not, see <http://www.gnu.org/licenses/>.
27
28 EXCEPTION : As a special exception, you may create a larger work
29 that contains this FAUST architecture section and distribute
30 that work under terms of your choice, so long as this FAUST
31 architecture section is not modified.
32
33
34 ************************************************************************
35 ************************************************************************/
36
37 #include <libgen.h>
38 #include <math.h>
39 #include <iostream>
40
41 #include "gui/console.h"
42 #include "misc.h"
43 #include "audio/jack-dsp.h"
44
45 #ifdef OSCCTRL
46 #include "gui/OSCUI.h"
47 #endif
48
49 using namespace std;
50
51
52 /******************************************************************************
53 *******************************************************************************
54
55 VECTOR INTRINSICS
56
57 *******************************************************************************
58 *******************************************************************************/
59
60 <<includeIntrinsic>>
61
62 /******************************************************************************
63 *******************************************************************************
64
65 USER INTERFACE
66
67 *******************************************************************************
68 /**************************BEGIN USER SECTION **************************/
69
70 <<includeclass>>
71
72 /***************************END USER SECTION ***************************/
73
74 /*******************BEGIN ARCHITECTURE SECTION (part 2/2)***************/
75
76 mydsp DSP;
77 list<GUI*> GUI::fGuiList;
78
79 //-------------------------------------------------------------------------
80 // MAIN
81 //-------------------------------------------------------------------------
82 int main(int argc, char *argv[] )
83 {
84 char jackname[256];
85 snprintf(jackname, 255, "%s", basename(argv[0]));
86
87 CMDUI* interface = new CMDUI(argc, argv);
88 DSP.buildUserInterface(interface);
89
90 #ifdef OSCCTRL
91 GUI* oscinterface = new OSCUI(jackname, argc, argv);
92 DSP.buildUserInterface(oscinterface);
93 #endif
94
95 jackaudio audio;
96 audio.init(jackname, &DSP);
97 interface->process_command();
98 audio.start();
99
100 #ifdef OSCCTRL
101 oscinterface->run();
102 #endif
103 interface->run();
104
105 audio.stop();
106 return 0;
107 }
108
109
110
111 /********************END ARCHITECTURE SECTION (part 2/2)****************/
112