]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/key-performer.cc
patch::: 1.1.25.jcn1: jcn1
[lilypond.git] / lily / key-performer.cc
index 527cf06cbbf6efcfbbc637179b68c0f8bbebc286..3260ef2ca75b6fd2b072e4ad4a27e3ca4e4c8957 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Jan Nieuwenhuizen <jan@digicash.com>
+  (c)  1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "key-performer.hh"
@@ -12,7 +12,7 @@
 
 
 
-IMPLEMENT_IS_TYPE_B1(Key_performer,Performer);
+
 ADD_THIS_TRANSLATOR(Key_performer);
 
 Key_performer::Key_performer()
@@ -29,7 +29,7 @@ Key_performer::do_print() const
 {
 #ifndef NPRINT
   if (key_req_l_)
-       key_req_l_->print();
+    key_req_l_->print();
 #endif
 }
 
@@ -37,21 +37,21 @@ void
 Key_performer::do_process_requests()
 {
   if (key_req_l_)
-       play (new Audio_key (key_req_l_));
+    play (new Audio_key (key_req_l_));
   key_req_l_ = 0;
 }
 
 bool
-Key_performer::do_try_request (Request* req_l)
+Key_performer::do_try_music (Music* req_l)
 {
-  if (key_req_l_)
-       return false;
-
-  if (req_l->command())
-       key_req_l_ = req_l->command()->keychange ();
-
-  if (key_req_l_)
-       return true;
+  if (Key_change_req *kc = dynamic_cast <Key_change_req *> (req_l))
+    {
+      if (key_req_l_)
+       warning ("FIXME. Key change merge");
+
+      key_req_l_ = kc;
+      return true;
+    }
 
   return false;
 }