first pass (ok, third really) at internal send+return - audio routing inside ardour...
[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 */
19
20 #ifndef __ardour_ardour_h__
21 #define __ardour_ardour_h__
22
23 #include <map>
24 #include <string>
25
26 #include <limits.h>
27 #include <signal.h>
28
29 #include "pbd/error.h"
30 #include "pbd/failed_constructor.h"
31
32 #include "ardour/types.h"
33
34 // #include <jack/jack.h> need this to inline jack_get_microseconds
35
36 namespace MIDI {
37         class MachineControl;
38         class Port;
39 }
40
41 namespace ARDOUR {
42
43         class AudioEngine;
44
45         static const nframes_t max_frames = JACK_MAX_FRAMES;
46         extern sigc::signal<void,std::string> BootMessage;
47
48         int init (bool with_vst, bool try_optimization);
49         int cleanup ();
50         bool no_auto_connect ();
51
52         std::string get_ardour_revision ();
53
54         void find_bindings_files (std::map<std::string,std::string>&);
55
56         const layer_t max_layer = UCHAR_MAX;
57
58         microseconds_t get_microseconds ();
59 /*      {
60         JACK has exported this functionality for a long time now 
61         but inlining this causes problems
62         return (microseconds_t) jack_get_time();
63         }
64 */
65         Change new_change ();
66
67         extern Change StartChanged;
68         extern Change LengthChanged;
69         extern Change PositionChanged;
70         extern Change NameChanged;
71         extern Change BoundsChanged;
72
73         struct LocaleGuard {
74             LocaleGuard (const char*);
75             ~LocaleGuard ();
76             const char* old;
77         };
78
79         static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */
80
81         void setup_fpu ();
82
83         extern MIDI::Port* default_mmc_port;
84         extern MIDI::Port* default_mtc_port;
85         extern MIDI::Port* default_midi_port;
86         extern MIDI::Port *default_midi_clock_port;
87         
88         int setup_midi ();
89 }
90
91 #endif /* __ardour_ardour_h__ */
92