create engine thread before sending notifications.
[ardour.git] / libs / ardour / legatize.cc
index d1892e0bbb26853bbd5d78d13862b9da02a06091..0c118a6a48fcb136466bd14df1a2f4fd7fbd49eb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 20014 Paul Davis
+    Copyright (C) 2014 Paul Davis
     Author: David Robillard
 
     This program is free software; you can redistribute it and/or modify
@@ -31,7 +31,7 @@ Legatize::~Legatize ()
 
 Command*
 Legatize::operator()(boost::shared_ptr<ARDOUR::MidiModel> model,
-                     Evoral::MusicalTime                  position,
+                     Evoral::Beats                        position,
                      std::vector<Legatize::Notes>&        seqs)
 {
        MidiModel::NoteDiffCommand* cmd = new MidiModel::NoteDiffCommand(model, "legatize");
@@ -43,10 +43,10 @@ Legatize::operator()(boost::shared_ptr<ARDOUR::MidiModel> model,
                                break;
                        }
 
-                       const Evoral::MusicalTime new_end = (*next)->time() - Evoral::MusicalTime::tick();
+                       const Evoral::Beats new_end = (*next)->time() - Evoral::Beats::tick();
                        if ((*i)->end_time() > new_end ||
                            (!_shrink_only && (*i)->end_time() < new_end)) {
-                               const Evoral::MusicalTime new_length(new_end - (*i)->time());
+                               const Evoral::Beats new_length(new_end - (*i)->time());
                                cmd->change((*i), MidiModel::NoteDiffCommand::Length, new_length);
                        }