do not allow smf_source's reads to stomp on cached read_end position in parent class...
[ardour.git] / libs / evoral / evoral / types.hpp
index f602c7b56fcbed9d451670d41525183a41becdad..9e48a68e3c1b8d2ae50e7cf133ab788bb65aa67b 100644 (file)
 
 #include <stdint.h>
 #include <list>
+#include <cmath>
 
 namespace Evoral {
 
 /** Frame count (i.e. length of time in audio frames) */
 typedef uint32_t FrameTime;
 
-/** Time-stamp of an event */
-typedef double timestamp_t;
+/** Musical time: beats relative to some defined origin */
+typedef double MusicalTime;
 
-/** Duration of time in timestamp_t units */
-typedef timestamp_t timedur_t;
-
-/** Time stamp of an event */
-typedef double EventLength;
+static inline bool musical_time_equal (MusicalTime a, MusicalTime b) {
+        /* acceptable tolerance is 1 tick. Nice if there was no magic number here */
+       return fabs (a - b) <= (1.0/1920.0); 
+}
 
 /** Type of an event (opaque, mapped by application) */
 typedef uint32_t EventType;