added global revision info access
[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/failed_constructor.h>
30
31 #include <ardour/configuration.h>
32 #include <ardour/types.h>
33
34 namespace MIDI {
35         class MachineControl;
36         class Port;
37 }
38
39 namespace ARDOUR {
40
41         class AudioEngine;
42         class OSC;
43
44         extern OSC* osc;
45
46         static const nframes_t max_frames = JACK_MAX_FRAMES;
47
48         int init (bool with_vst, bool try_optimization);
49         int cleanup ();
50         
51         std::string get_ardour_revision ();
52         
53         std::string get_user_ardour_path ();
54         std::string get_system_data_path ();
55         std::string get_system_module_path ();
56
57         std::string find_config_file (std::string name);
58         std::string find_data_file (std::string name, std::string subdir = "" );
59
60         const layer_t max_layer = UCHAR_MAX;
61
62         microseconds_t get_microseconds ();
63
64         Change new_change ();
65
66         extern Change StartChanged;
67         extern Change LengthChanged;
68         extern Change PositionChanged;
69         extern Change NameChanged;
70         extern Change BoundsChanged;
71
72         struct LocaleGuard {
73             LocaleGuard (const char*);
74             ~LocaleGuard ();
75             const char* old;
76         };
77
78         static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */
79 }
80
81 /* how do we make these be within the Ardour namespace? */
82
83 extern MIDI::Port* default_mmc_port;
84 extern MIDI::Port* default_mtc_port;
85 extern MIDI::Port* default_midi_port;
86
87 #endif /* __ardour_ardour_h__ */
88