Move Stateful class declared in pbd/stateful.h into the PBD namespace
[ardour.git] / libs / ardour / ardour / types.h
index 61e5f35c95ce8bc24c95580ad5eaf82e5dbcce29..d5f10410db8ff2e933e84c7694ac44b8a7ee7bdd 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_types_h__
 typedef int intptr_t;
 #endif
 
+/* eventually, we'd like everything (including JACK) to 
+   move to this. for now, its a dedicated type.
+*/
+
+typedef int64_t                    nframes64_t;
+
 namespace ARDOUR {
 
        class Source;
@@ -54,8 +59,22 @@ namespace ARDOUR {
        typedef uint64_t                    microseconds_t;
        typedef uint32_t                    nframes_t;
 
-       typedef jack_midi_event_t MidiEvent;
-       typedef unsigned char     RawMidi;
+       typedef unsigned char Byte;
+
+       /** Identical to jack_midi_event_t, but with double timestamp
+        *
+        * time is either a frame time (from/to Jack) or a beat time (internal
+        * tempo time, used in MidiModel) depending on context.
+        */
+       struct MidiEvent {
+               MidiEvent(double t=0, size_t s=0, Byte* b=NULL)
+               : time(t), size(s), buffer(b)
+               {}
+               
+               double time;   /**< Sample index (or beat time) at which event is valid */
+               size_t size;   /**< Number of bytes of data in \a buffer */
+               Byte*  buffer; /**< Raw MIDI data */
+       };
 
        enum IOChange {
                NoChange = 0,
@@ -89,11 +108,17 @@ namespace ARDOUR {
                Play = 0x4
        };
 
+       std::string auto_state_to_string (AutoState);
+       AutoState string_to_auto_state (std::string);
+
        enum AutoStyle {
                Absolute = 0x1,
                Trim = 0x2
        };
 
+       std::string auto_style_to_string (AutoStyle);
+       AutoStyle string_to_auto_style (std::string);
+
        enum AlignStyle {
                CaptureTime,
                ExistingMaterial
@@ -137,6 +162,18 @@ namespace ARDOUR {
            }
            
        };
+       enum SmpteFormat {
+               smpte_23976,
+               smpte_24,
+               smpte_24976,
+               smpte_25,
+               smpte_2997,
+               smpte_2997drop,
+               smpte_30,
+               smpte_30drop,
+               smpte_5994,
+               smpte_60
+       };
 
        struct AnyTime {
            enum Type {
@@ -247,6 +284,19 @@ namespace ARDOUR {
                ExternalMonitoring,
        };
 
+       enum DenormalModel {
+               DenormalNone,
+               DenormalFTZ,
+               DenormalDAZ,
+               DenormalFTZDAZ
+       };
+
+       enum RemoteModel {
+               UserOrdered,
+               MixerOrdered,
+               EditorOrdered,
+       };
+
        enum CrossfadeModel {
                FullCrossfade,
                ShortCrossfade
@@ -316,7 +366,7 @@ namespace ARDOUR {
        };
 
        enum ShuttleUnits {
-               Percentage,
+               Percentage,
                Semitones
        };
 
@@ -328,12 +378,15 @@ 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::RemoteModel& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::SoloModel& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::LayerModel& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::CrossfadeModel& sf);
 std::istream& operator>>(std::istream& o, ARDOUR::SlaveSource& 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::SmpteFormat& sf);
+std::istream& operator>>(std::istream& o, ARDOUR::DenormalModel& sf);
 
 using ARDOUR::nframes_t;