fix missing Click outputs for new sessions
[ardour.git] / libs / ardour / ardour / types.h
index 01f8e87c7424ca9e2e9c36efa535ede69086d12d..ee43d1f30f4b064016b33fa3dfcf4bb95edcf7bf 100644 (file)
 #include <boost/shared_ptr.hpp>
 #include <sys/types.h>
 #include <stdint.h>
+#include <pthread.h>
 
 #include <inttypes.h>
-#include <jack/types.h>
-#include <jack/midiport.h>
 
 #include "timecode/bbt_time.h"
 #include "timecode/time.h"
@@ -53,12 +52,12 @@ namespace ARDOUR {
        class Route;
        class Region;
 
-       typedef jack_default_audio_sample_t Sample;
-       typedef float                       pan_t;
-       typedef float                       gain_t;
-       typedef uint32_t                    layer_t;
-       typedef uint64_t                    microseconds_t;
-       typedef jack_nframes_t              pframes_t;
+       typedef float    Sample;
+       typedef float    pan_t;
+       typedef float    gain_t;
+       typedef uint32_t layer_t;
+       typedef uint64_t microseconds_t;
+       typedef uint32_t pframes_t;
 
        /* Any position measured in audio frames.
           Assumed to be non-negative but not enforced.
@@ -177,6 +176,20 @@ namespace ARDOUR {
                MeterCustom
        };
 
+       enum MeterType {
+               MeterMaxSignal = 0x001,
+               MeterMaxPeak   = 0x002,
+               MeterPeak      = 0x004,
+               MeterKrms      = 0x008,
+               MeterK20       = 0x010,
+               MeterK14       = 0x020,
+               MeterIEC1DIN   = 0x040,
+               MeterIEC1NOR   = 0x080,
+               MeterIEC2BBC   = 0x100,
+               MeterIEC2EBU   = 0x200,
+               MeterVU        = 0x400
+       };
+
        enum TrackMode {
                Normal,
                NonLayered,
@@ -369,6 +382,13 @@ namespace ARDOUR {
                MeteringRoute  ///< meter what is going through the route
        };
 
+       enum VUMeterStandard {
+               MeteringVUfrench,   // 0VU = -2dBu
+               MeteringVUamerican, // 0VU =  0dBu
+               MeteringVUstandard, // 0VU = +4dBu
+               MeteringVUeight     // 0VU = +8dBu
+       };
+
        enum MeterLineUp {
                MeteringLineUp24,
                MeteringLineUp20,
@@ -469,7 +489,12 @@ namespace ARDOUR {
        };
 
        enum SyncSource {
-               JACK,
+               /* These are "synonyms". It is important for JACK to be first
+                  both here and in enums.cc, so that the string "JACK" is
+                  correctly recognized in older session and preference files.
+               */
+               JACK = 0,
+               Engine = 0,
                MTC,
                MIDIClock,
                LTC
@@ -564,6 +589,32 @@ namespace ARDOUR {
                FadeSymmetric,
        };
 
+       enum TransportState {
+               /* these values happen to match the constants used by JACK but
+                  this equality cannot be assumed.
+               */
+               TransportStopped = 0,
+               TransportRolling = 1, 
+               TransportLooping = 2, 
+               TransportStarting = 3,
+       };
+
+       enum PortFlags {
+               /* these values happen to match the constants used by JACK but
+                  this equality cannot be assumed.
+               */
+               IsInput = 0x1, 
+               IsOutput = 0x2,
+               IsPhysical = 0x4,
+               CanMonitor = 0x8,
+               IsTerminal = 0x10
+       };
+
+       struct LatencyRange {
+           uint32_t min; //< samples
+           uint32_t max; //< samples
+       };
+
 } // namespace ARDOUR
 
 
@@ -576,6 +627,7 @@ std::istream& operator>>(std::istream& o, ARDOUR::HeaderFormat& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::AutoConnectOption& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::EditMode& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::MonitorModel& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::VUMeterStandard& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::MeterLineUp& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::PFLPosition& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::AFLPosition& sf);
@@ -598,6 +650,7 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::HeaderFormat& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::AutoConnectOption& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::EditMode& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::MonitorModel& sf);
+std::ostream& operator<<(std::ostream& o, const ARDOUR::VUMeterStandard& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::MeterLineUp& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::PFLPosition& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::AFLPosition& sf);