Introduce global default-fade-shape configuration variable
[ardour.git] / libs / ardour / ardour / types.h
index 127c840840ef20feafd6b5bd2d8ca15ae24ca6fb..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,
@@ -200,20 +215,8 @@ namespace ARDOUR {
                TrackColor
        };
 
-       enum TimecodeFormat {
-               timecode_23976,
-               timecode_24,
-               timecode_24976,
-               timecode_25,
-               timecode_2997,
-               timecode_2997drop,
-               timecode_30,
-               timecode_30drop,
-               timecode_5994,
-               timecode_60
-       };
-
-       struct AnyTime {
+       class AnyTime {
+       public:
                enum Type {
                        Timecode,
                        BBT,
@@ -320,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 {
@@ -374,6 +379,20 @@ 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,
+               MeteringLineUp18,
+               MeteringLineUp15
+       };
+
        enum PFLPosition {
                /** PFL signals come from before pre-fader processors */
                PFLFromBeforeProcessors,
@@ -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,9 +477,15 @@ 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
+               MIDIClock,
+               LTC
        };
 
        enum ShuttleBehaviour {
@@ -557,10 +573,34 @@ namespace ARDOUR {
                FadeLinear,
                FadeFast,
                FadeSlow,
-               FadeLogA,
-               FadeLogB,
-               FadeConstantPowerMinus3dB,
-               FadeConstantPowerMinus6dB,
+               FadeConstantPower,
+               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
@@ -575,6 +615,8 @@ 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);
 std::istream& operator>>(std::istream& o, ARDOUR::RemoteModel& sf);
@@ -585,17 +627,20 @@ std::istream& operator>>(std::istream& o, ARDOUR::CrossfadeChoice& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::SyncSource& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::ShuttleBehaviour& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::ShuttleUnits& sf);
-std::istream& operator>>(std::istream& o, ARDOUR::TimecodeFormat& sf);
+std::istream& operator>>(std::istream& o, Timecode::TimecodeFormat& sf);
 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);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::RemoteModel& sf);
@@ -606,11 +651,12 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::CrossfadeChoice& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::SyncSource& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::ShuttleBehaviour& sf);
 std::ostream& operator<<(std::ostream& o, const ARDOUR::ShuttleUnits& sf);
-std::ostream& operator<<(std::ostream& o, const ARDOUR::TimecodeFormat& sf);
+std::ostream& operator<<(std::ostream& o, const Timecode::TimecodeFormat& sf);
 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)