2 performer-group-performer.cc -- implement Performer_group_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1996--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 Jan Nieuwenhuizen <janneke@gnu.org>
10 #include "performer-group-performer.hh"
12 #include "audio-element.hh"
16 ENTER_DESCRIPTION (Performer_group_performer
,
27 Performer_group_performer::announce_element (Audio_element_info info
)
29 announce_infos_
.push (info
);
31 = unsmob_translator (daddy_context_
->daddy_context_
->implementation_
);
33 if (Performer_group_performer
* eg
= dynamic_cast<Performer_group_performer
*> (t
))
34 eg
->announce_element (info
);
38 Performer_group_performer::acknowledge_audio_elements ()
40 for (int j
=0; j
< announce_infos_
.size (); j
++)
42 Audio_element_info info
= announce_infos_
[j
];
44 for (SCM p
= get_simple_trans_list (); ly_pair_p (p
); p
= ly_cdr (p
))
46 Translator
* t
= unsmob_translator (ly_car (p
));
47 Performer
* eng
= dynamic_cast<Performer
*> (t
);
48 if (eng
&& eng
!= info
.origin_trans_
)
49 eng
->acknowledge_audio_element (info
);
55 Performer_group_performer::do_announces ()
59 create_audio_elements ();
60 performer_each (get_simple_trans_list (),
61 &Performer::create_audio_elements
);
63 if (!announce_infos_
.size ())
66 acknowledge_audio_elements ();
67 announce_infos_
.clear ();
71 Performer_group_performer::Performer_group_performer ()
77 performer_each (SCM list
, Performer_method method
)
79 for (SCM p
= list
; ly_pair_p (p
); p
= ly_cdr (p
))
81 Performer
* e
= dynamic_cast<Performer
*>(unsmob_translator (ly_car (p
)));