]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/midi-walker.cc
Strip midi-debugging ; add memory check to watch RSS value.
[lilypond.git] / lily / midi-walker.cc
index 48c4cf8723658aa6a4eb37ecd9b580f4500c8504..941e64c282932e753a97c1aa494327d339929ef8 100644 (file)
@@ -17,7 +17,7 @@
 
 Midi_note_event::Midi_note_event ()
 {
-  ignore_b_ = false;
+  ignore_ = false;
 }
 
 int
@@ -53,12 +53,10 @@ Midi_walker::Midi_walker (Audio_staff *audio_staff, Midi_track *track,
 
 Midi_walker::~Midi_walker ()
 {
-  do_stop_notes (last_tick_ + 384);
-
-  for (vsize i = 0; i < midi_items_.size (); i++)
-    delete midi_items_[i];
+  do_stop_notes (INT_MAX);
 }
 
+
 /**
    Find out if start_note event is needed, and do it if needed.
 */
@@ -80,7 +78,8 @@ Midi_walker::do_start_note (Midi_note *note)
            {
              /* let stopnote in queue be ignored,
                 new stop note wins */
-             stop_note_queue[i].ignore_b_ = true;
+             stop_note_queue[i].ignore_ = true;
+
              /* don't replay start note, */
              play_start = false;
              break;
@@ -105,8 +104,6 @@ Midi_walker::do_start_note (Midi_note *note)
 
       if (play_start)
        output_event (ptr->audio_column_->ticks (), note);
-
-      midi_items_.push_back (e.val);
     }
 }
 
@@ -119,7 +116,7 @@ Midi_walker::do_stop_notes (int max_ticks)
   while (stop_note_queue.size () && stop_note_queue.front ().key <= max_ticks)
     {
       Midi_note_event e = stop_note_queue.get ();
-      if (e.ignore_b_)
+      if (e.ignore_)
        {
          delete e.val;
          continue;
@@ -132,9 +129,6 @@ Midi_walker::do_stop_notes (int max_ticks)
     }
 }
 
-/**
-   Advance the track to #now#, output the item, and adjust current "moment".
-*/
 void
 Midi_walker::output_event (int now_ticks, Midi_item *l)
 {
@@ -165,7 +159,6 @@ Midi_walker::process ()
       if (Midi_channel_item *mci = dynamic_cast<Midi_channel_item*> (midi))
        mci->channel_ = channel_;
       
-      //midi->channel_ = track_->number_;
       if (Midi_note *note = dynamic_cast<Midi_note *> (midi))
        {
          if (note->audio_->length_mom_.to_bool ())
@@ -173,9 +166,6 @@ Midi_walker::process ()
        }
       else
        output_event (audio->audio_column_->ticks (), midi);
-
-
-      midi_items_.push_back (midi);
     }
 }