Move Stateful class declared in pbd/stateful.h into the PBD namespace
[ardour.git] / libs / ardour / ardour / types.h
index b155965cabe09319a679892d2adf2fd133b01f62..d5f10410db8ff2e933e84c7694ac44b8a7ee7bdd 100644 (file)
 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;
@@ -53,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,
@@ -264,6 +284,13 @@ namespace ARDOUR {
                ExternalMonitoring,
        };
 
+       enum DenormalModel {
+               DenormalNone,
+               DenormalFTZ,
+               DenormalDAZ,
+               DenormalFTZDAZ
+       };
+
        enum RemoteModel {
                UserOrdered,
                MixerOrdered,
@@ -359,6 +386,7 @@ 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;