do not allow smf_source's reads to stomp on cached read_end position in parent class...
[ardour.git] / libs / evoral / evoral / Control.hpp
index 173356b60fa6bfed3b3b6a27297ad7edb5899e57..806125d9736f33a2f5d607eb4318510108a68292 100644 (file)
@@ -22,9 +22,8 @@
 #include <set>
 #include <map>
 #include <boost/shared_ptr.hpp>
-#include <glibmm/thread.h>
-#include <evoral/types.hpp>
-#include <evoral/Parameter.hpp>
+#include "evoral/types.hpp"
+#include "evoral/Parameter.hpp"
 
 namespace Evoral {
 
@@ -37,9 +36,17 @@ public:
        Control(const Parameter& parameter, boost::shared_ptr<ControlList>);
        virtual ~Control() {}
 
-       virtual void  set_float(float val, bool to_list=false, nframes_t frame=0);
-       virtual float get_float(bool from_list=false, nframes_t frame=0) const;
-       virtual float user_float() const;
+       virtual void  set_float(float val, bool to_list=false, FrameTime frame=0);
+       virtual float get_float(bool from_list=false, FrameTime frame=0) const;
+       
+
+       /** Get the latest user-set value
+        * (which may not equal get_value() when automation is playing back).
+        *
+        * Automation write/touch works by periodically sampling this value
+        * and adding it to the ControlList.
+        */
+       float user_float() const { return _user_value; }
 
        void set_list(boost::shared_ptr<ControlList>);