Introduce global default-fade-shape configuration variable
[ardour.git] / libs / ardour / ardour / types.h
index c41c599f1c2dfdeb9907af834130b2f8639d00be..1b9c3326c00f64b724ddc8e810e1135672adeb5d 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"
@@ -39,6 +38,7 @@
 #include "evoral/Range.hpp"
 
 #include "ardour/chan_count.h"
+#include "ardour/plugin_types.h"
 
 #include <map>
 
@@ -53,12 +53,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 +177,21 @@ 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,
+               MeterK12       = 0x800
+       };
+
        enum TrackMode {
                Normal,
                NonLayered,
@@ -308,10 +323,12 @@ namespace ARDOUR {
                MeterFalloffOff = 0,
                MeterFalloffSlowest = 1,
                MeterFalloffSlow = 2,
-               MeterFalloffMedium = 3,
-               MeterFalloffFast = 4,
-               MeterFalloffFaster = 5,
-               MeterFalloffFastest = 6
+               MeterFalloffSlowish = 3,
+               MeterFalloffModerate = 4,
+               MeterFalloffMedium = 5,
+               MeterFalloffFast = 6,
+               MeterFalloffFaster = 7,
+               MeterFalloffFastest = 8,
        };
 
        enum MeterHold {
@@ -338,11 +355,6 @@ namespace ARDOUR {
                PostFader
        };
 
-        enum RouteSortOrderKey { 
-               EditorSort,
-               MixerSort
-       };
-           
        enum MonitorModel {
                HardwareMonitoring, ///< JACK does monitoring
                SoftwareMonitoring, ///< Ardour does monitoring
@@ -367,6 +379,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,
@@ -397,8 +416,7 @@ namespace ARDOUR {
 
        enum RemoteModel {
                UserOrdered,
-               MixerOrdered,
-               EditorOrdered
+               MixerOrdered
        };
 
        enum CrossfadeModel {
@@ -452,14 +470,6 @@ namespace ARDOUR {
                PeakDatum max;
        };
 
-       enum PluginType {
-               AudioUnit,
-               LADSPA,
-               LV2,
-               Windows_VST,
-               LXVST,
-       };
-
        enum RunContext {
                ButlerContext = 0,
                TransportContext,
@@ -467,7 +477,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
@@ -562,6 +577,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
 
 
@@ -574,6 +615,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);
@@ -590,12 +632,14 @@ std::istream& operator>>(std::istream& o, ARDOUR::DenormalModel& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::WaveformScale& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::WaveformShape& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::PositionLockStyle& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::FadeShape& sf);
 
 std::ostream& operator<<(std::ostream& o, const ARDOUR::SampleFormat& sf);
 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);
@@ -612,6 +656,7 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::DenormalModel& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformScale& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformShape& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::PositionLockStyle& sf);
+std::ostream& operator<<(std::ostream& o, const ARDOUR::FadeShape& sf);
 
 static inline ARDOUR::framepos_t
 session_frame_to_track_frame (ARDOUR::framepos_t session_frame, double speed)