LTC slave fix fps detection with 29.97000 option
[ardour.git] / libs / ardour / midi_stretch.cc
index 2ae86a6d1c39e161cfbf8cac5ccdb720938d1abd..1794d5ff93553cb6e7cbbe16b5575ef202ffb724 100644 (file)
 
 #include "pbd/error.h"
 
-#include "ardour/types.h"
-#include "ardour/midi_stretch.h"
-#include "ardour/session.h"
+#include "ardour/midi_model.h"
 #include "ardour/midi_region.h"
+#include "ardour/midi_source.h"
+#include "ardour/midi_stretch.h"
+#include "ardour/types.h"
 
 #include "i18n.h"
 
@@ -31,7 +32,7 @@ using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
 
-MidiStretch::MidiStretch (Session& s, TimeFXRequest& req)
+MidiStretch::MidiStretch (Session& s, const TimeFXRequest& req)
        : Filter (s)
        , _request (req)
 {
@@ -84,7 +85,7 @@ MidiStretch::run (boost::shared_ptr<Region> r, Progress*)
        boost::shared_ptr<MidiSource> new_src = boost::dynamic_pointer_cast<MidiSource>(nsrcs[0]);
        assert(new_src);
 
-       Glib::Mutex::Lock sl (new_src->mutex ());
+       Glib::Threads::Mutex::Lock sl (new_src->mutex ());
 
        new_src->load_model(false, true);
        boost::shared_ptr<MidiModel> new_model = new_src->model();
@@ -99,7 +100,7 @@ MidiStretch::run (boost::shared_ptr<Region> r, Progress*)
 
                // FIXME: double copy
                Evoral::Event<MidiModel::TimeType> ev(*i, true);
-               ev.time() = new_time;
+               ev.set_time(new_time);
                new_model->append(ev, Evoral::next_event_id());
        }