X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fevoral%2Fevoral%2Ftypes.hpp;h=9e48a68e3c1b8d2ae50e7cf133ab788bb65aa67b;hb=fa4e858eb351668bc6687819903d019703daef7a;hp=f602c7b56fcbed9d451670d41525183a41becdad;hpb=166ef64e3db4ab72b7b1e7455234e2b9ceddf6d8;p=ardour.git diff --git a/libs/evoral/evoral/types.hpp b/libs/evoral/evoral/types.hpp index f602c7b56f..9e48a68e3c 100644 --- a/libs/evoral/evoral/types.hpp +++ b/libs/evoral/evoral/types.hpp @@ -21,20 +21,20 @@ #include #include +#include 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;