]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/performance.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / performance.cc
index 695bb399f7a00cc15be7a9e6831e877521016a46..f765a3193772b021c0bcda98209810b2f676753e 100644 (file)
@@ -23,17 +23,14 @@ using namespace std;
 #include "string-convert.hh"
 #include "warn.hh"
 
-#include "killing-cons.tcc"
-
 Performance::Performance ()
 {
   midi_ = 0;
-  audio_element_list_ = 0;
 }
 
 Performance::~Performance ()
 {
-  delete audio_element_list_;
+  junk_pointers (audio_elements_);
 }
 
 void
@@ -48,7 +45,7 @@ Performance::output (Midi_stream &midi_stream)
   output_header_track (midi_stream);
   message (_ ("Track...") + " ");
   int channel = 0;
-  for (int i = 0; i < audio_staffs_.size (); i++)
+  for (vsize i = 0; i < audio_staffs_.size (); i++)
     {
       Audio_staff *s = audio_staffs_[i];
       if (be_verbose_global)
@@ -89,8 +86,8 @@ Performance::output_header_track (Midi_stream &midi_stream)
   midi_track.channel_ = 9;
 
   // perhaps multiple text events?
-  std::string id_string;
-  std::string str = std::string (_ ("Creator: "));
+  string id_string;
+  string str = string (_ ("Creator: "));
   id_string = String_convert::pad_to (gnu_lilypond_version_string (), 30);
   str += id_string;
 
@@ -145,12 +142,13 @@ void
 Performance::add_element (Audio_element *p)
 {
   if (Audio_staff *s = dynamic_cast<Audio_staff *> (p))
-    audio_staffs_.push (s);
-  audio_element_list_ = new Killing_cons<Audio_element> (p, audio_element_list_);
+    audio_staffs_.push_back (s);
+
+  audio_elements_.push_back (p);
 }
 
 void
-Performance::write_output (std::string out)
+Performance::write_output (string out)
 {
   if (out == "-")
     out = "lelie.midi";