lilypond-1.3.28
[lilypond.git] / lily / meter-performer.cc
blob44849ab744b7813867e73cc1ffa6babdea77f2ba
1 /*
2 meter-performer.cc -- implement Meter_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Jan Nieuwenhuizen <jan@digicash.com>
7 */
9 #include "meter-performer.hh"
10 #include "command-request.hh"
11 #include "audio-item.hh"
13 IMPLEMENT_IS_TYPE_B1(Meter_performer,Performer);
14 ADD_THIS_TRANSLATOR(Meter_performer);
16 Meter_performer::Meter_performer()
18 meter_req_l_ = 0;
21 Meter_performer::~Meter_performer()
25 void
26 Meter_performer::do_print() const
28 #ifndef NPRINT
29 if (meter_req_l_)
30 meter_req_l_->print();
31 #endif
34 void
35 Meter_performer::do_process_requests()
37 if (meter_req_l_)
38 play (new Audio_meter (meter_req_l_));
39 meter_req_l_ = 0;
42 bool
43 Meter_performer::do_try_request (Request* req_l)
45 if (meter_req_l_)
46 return false;
48 if (req_l->command())
49 meter_req_l_ = req_l->command()->meterchange ();
51 if (meter_req_l_)
52 return true;
54 return false;