libardour added.
[ardour.git] / libs / ardour / ardour / ardour.h
1 /*
2     Copyright (C) 1999 Paul Davis 
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18     $Id$
19 */
20
21 #ifndef __ardour_ardour_h__
22 #define __ardour_ardour_h__
23
24 #include <limits.h>
25 #include <string>
26 #include <signal.h>
27
28 #include <pbd/error.h>
29 #include <pbd/lockmonitor.h>
30 #include <pbd/failed_constructor.h>
31
32 #include <ardour/configuration.h>
33 #include <ardour/types.h>
34
35 using namespace PBD;
36
37 namespace MIDI {
38         class MachineControl;
39         class Port;
40 }
41
42 namespace ARDOUR {
43
44         class AudioEngine;
45
46         static const jack_nframes_t max_frames = JACK_MAX_FRAMES;
47
48         int init (AudioEngine&, bool with_vst, bool try_optimization, void (*sighandler)(int,siginfo_t*,void*) = 0);
49         int cleanup ();
50         std::string find_config_file (std::string name);
51         std::string find_data_file (std::string name);
52
53         const layer_t max_layer = UCHAR_MAX;
54
55         id_t new_id();
56
57         Change new_change ();
58
59         extern Change StartChanged;
60         extern Change LengthChanged;
61         extern Change PositionChanged;
62         extern Change NameChanged;
63         extern Change BoundsChanged;
64
65         struct LocaleGuard {
66             LocaleGuard (const char*);
67             ~LocaleGuard ();
68             const char* old;
69         };
70
71 };
72
73 /* how do we make these be within the Ardour namespace? */
74
75 extern MIDI::Port* default_mmc_port;
76 extern MIDI::Port* default_mtc_port;
77 extern MIDI::Port* default_midi_port;
78
79 #endif /* __ardour_ardour_h__ */
80