]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/key-performer.cc
release: 1.1.0
[lilypond.git] / lily / key-performer.cc
index d4d0527aa06e1d20f987da38e4ef8a0a2cf15177..3ccac03e21537a71d0b589984c1624838e53638c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
+  (c)  1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "key-performer.hh"
@@ -13,7 +13,7 @@
 
 
 IMPLEMENT_IS_TYPE_B1(Key_performer,Performer);
-ADD_THIS_PERFORMER(Key_performer);
+ADD_THIS_TRANSLATOR(Key_performer);
 
 Key_performer::Key_performer()
 {
@@ -28,30 +28,30 @@ void
 Key_performer::do_print() const
 {
 #ifndef NPRINT
-  if ( key_req_l_)
+  if (key_req_l_)
        key_req_l_->print();
 #endif
 }
 
 void
-Key_performer::process_requests()
+Key_performer::do_process_requests()
 {
-  if ( key_req_l_)
-       play (new Audio_key (key_req_l_) );
+  if (key_req_l_)
+       play (new Audio_key (key_req_l_));
   key_req_l_ = 0;
 }
 
 bool
 Key_performer::do_try_request (Request* req_l)
 {
-  if ( key_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 (dynamic_cast <Key_change_req *> (req_l))
+    {
+      key_req_l_ = dynamic_cast <Key_change_req*> (req_l);
+      return true;
+    }
 
   return false;
 }