X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstaff-performer.cc;h=44597fe411fe2ebd6ae4c6d8fc51dfd631d50899;hb=4c98b01aebe68dfd73d4954ad67143d4a85a250b;hp=ac2cfa3aab92b99bd22df23683d1974a8b87afa6;hpb=106e5978fe2fa568bbc6649bc8fcf1134307373a;p=lilypond.git diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index ac2cfa3aab..44597fe411 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Jan Nieuwenhuizen + (c) 1997--1999 Jan Nieuwenhuizen */ #include "staff-performer.hh" @@ -13,7 +13,7 @@ #include "audio-item.hh" #include "audio-staff.hh" -IMPLEMENT_IS_TYPE_B1 (Staff_performer,Performer_group_performer); + ADD_THIS_TRANSLATOR (Staff_performer); Staff_performer::Staff_performer () @@ -77,9 +77,9 @@ String Staff_performer::new_instrument_str () { // mustn't ask Score for instrument: it will return piano! - String str = get_property ("midi_instrument"); + String str = get_property ("midi_instrument", 0); if (!str.length_i ()) - str = get_property ("instrument"); + str = get_property ("instrument", 0); if (str == instrument_str_) return ""; @@ -97,9 +97,9 @@ Staff_performer::new_instrument_str () void Staff_performer::play (Audio_element* p) { - if (p->is_type_b (Audio_item::static_name ())) + if (Audio_item *ai = dynamic_cast (p)) { - audio_staff_p_->add_audio_item ( (Audio_item*)p); + audio_staff_p_->add_audio_item (ai); } Performer::play (p); }