]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie-performer.cc
release: 1.3.61
[lilypond.git] / lily / tie-performer.cc
index 0d7d5a0257dbe76a66dfbb0ba9383b357c1c196e..51d1375d849d376995eea6dd56a834c9b8a12d56 100644 (file)
@@ -1,9 +1,9 @@
 /*   
-  tie-performer.cc --  implement 
+  tie-performer.cc --  implement Tie_performer
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1999--2000 Jan Nieuwenhuizen <janneke@gnu.org>
   
  */
 
@@ -23,10 +23,13 @@ Tie_performer::Tie_performer()
 bool
 Tie_performer::do_try_music (Music *m)
 {
-  if (Tie_req * c = dynamic_cast<Tie_req*> (m))
+  if (!req_l_)
     {
-      req_l_ = c;
-      return true;
+      if (Tie_req * c = dynamic_cast<Tie_req*> (m))
+       {
+         req_l_ = c;
+         return true;
+       }
     }
   return false;
 }
@@ -44,7 +47,7 @@ Tie_performer::acknowledge_element (Audio_element_info i)
 }
 
 void
-Tie_performer::do_process_requests ()
+Tie_performer::do_process_music ()
 {
   if (req_l_)
     {
@@ -121,14 +124,8 @@ Tie_performer::do_pre_move_processing ()
   for (int i=0; i<  tie_p_arr_.size (); i++)
    {
      //play_element (tie_p_arr_[i]);
-     /*
-       urg.
-       doesn't work for c ~ c ~ c
-      */
-     tie_p_arr_[i]->note_l_drul_[LEFT]->length_mom_ +=
-       tie_p_arr_[i]->note_l_drul_[RIGHT]->length_mom_;
-     tie_p_arr_[i]->note_l_drul_[RIGHT]->length_mom_ = 0;
-    }
+     tie_p_arr_[i]->note_l_drul_[RIGHT]->tie_to (tie_p_arr_[i]->note_l_drul_[LEFT]);
+   }
   tie_p_arr_.clear ();
 }