]> git.donarmstrong.com Git - lilypond.git/blob - lily/lyric-performer.cc
patch::: 1.1.37.script1
[lilypond.git] / lily / lyric-performer.cc
1 /*
2   lyric-performer.cc -- implement Lyric_performer
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1999 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "lyric-performer.hh"
10 #include "musical-request.hh"
11 #include "audio-item.hh"
12
13
14
15
16 ADD_THIS_TRANSLATOR(Lyric_performer);
17
18 void 
19 Lyric_performer::do_print() const
20 {
21 #ifndef NPRINT
22   if (lreq_arr_.size())
23     lreq_arr_[0]->print();
24 #endif
25 }
26
27 void
28 Lyric_performer::do_process_requests()
29 {
30   if (lreq_arr_.size() && lreq_arr_[0]->text_str_.length_i())
31     play (new Audio_text (Audio_text::LYRIC, lreq_arr_[0]->text_str_));
32   lreq_arr_.clear();
33 }
34
35 bool
36 Lyric_performer::do_try_music (Music* req_l)
37 {
38   if (Lyric_req *lr = dynamic_cast <Lyric_req *> (req_l))
39     {
40       lreq_arr_.push (lr);
41       return true;
42     }
43   return false;
44 }
45