2 performer-group-performer.cc -- implement Performer_group_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1996--2002 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,
26 Performer_group_performer::announce_element (Audio_element_info info)
28 announce_info_arr_.push (info);
29 Performer::announce_element (info);
35 Performer_group_performer::create_audio_elements ()
37 for (SCM p = simple_trans_list_; gh_pair_p (p); p = ly_cdr (p))
39 Translator * t = unsmob_translator (ly_car (p));
40 Performer * eng = dynamic_cast<Performer*> (t);
42 eng->create_audio_elements ();
47 Performer_group_performer::acknowledge_audio_elements ()
49 for (int j =0; j < announce_info_arr_.size (); j++)
51 Audio_element_info info = announce_info_arr_[j];
53 for (SCM p = simple_trans_list_; gh_pair_p (p); p = ly_cdr (p))
55 Translator * t = unsmob_translator (ly_car (p));
56 Performer * eng = dynamic_cast<Performer*> (t);
57 if (eng && eng!= info.origin_trans_l_)
58 eng->acknowledge_audio_element (info);
64 Performer_group_performer::do_announces ()
66 for (SCM p = trans_group_list_; gh_pair_p (p); p =ly_cdr (p))
68 Translator * t = unsmob_translator (ly_car (p));
69 dynamic_cast<Performer_group_performer*> (t)->do_announces ();
73 create_audio_elements ();
75 while (announce_info_arr_.size ())
77 acknowledge_audio_elements ();
78 announce_info_arr_.clear ();
79 create_audio_elements ();
82 if (announce_info_arr_.size ())
84 #if 0 //printf? -> include <stdio.h>
85 printf ("do_announces: elt: %s\n",
86 classname (announce_info_arr_[0].elem_l_));
88 announce_info_arr_.clear ();
92 Performer_group_performer::Performer_group_performer(){}