Allow trim of midi regions to before the start of the source. Fixes #3156.
[ardour.git] / libs / evoral / evoral / TimeConverter.hpp
index 9c53d0370ce1095b9657b83623233b89eb34d9d1..25371a18bf88700a64ba477ccfdea78b4bc03ec1 100644 (file)
@@ -29,6 +29,7 @@ namespace Evoral {
 template<typename A, typename B>
 class TimeConverter {
 public:
+       TimeConverter (B ob = 0) : _origin_b (ob) {}
        virtual ~TimeConverter() {}
 
        /** Convert A time to B time (A to B) */
@@ -36,6 +37,17 @@ public:
 
        /** Convert B time to A time (A from B) */
        virtual A from(B b) const = 0;
+
+       B origin_b () const {
+               return _origin_b;
+       }
+       
+       void set_origin_b (B o) {
+               _origin_b = o;
+       }
+
+protected:
+       B _origin_b;
 };