remove some unnecessary and hard-to-compile-on-OSX debug stuff
[ardour.git] / libs / ardour / midi_track.cc
index f79ed520c0a17551202f88dbfb16522544721d73..452e3038bd2825fe365300b226e4da82541b9312 100644 (file)
@@ -105,6 +105,10 @@ MidiTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
        _diskstream->set_record_enabled (false);
        //_diskstream->monitor_input (false);
 
+       _diskstream_data_recorded_connection.disconnect ();
+       boost::shared_ptr<MidiDiskstream> mds = boost::dynamic_pointer_cast<MidiDiskstream> (ds);
+       mds->DataRecorded.connect_same_thread (_diskstream_data_recorded_connection, boost::bind (&MidiTrack::diskstream_data_recorded, this, _1, _2));
+
        DiskstreamChanged (); /* EMIT SIGNAL */
 }
 
@@ -381,7 +385,7 @@ MidiTrack::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame
 }
 
 int
-MidiTrack::no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
+MidiTrack::no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
                    bool state_changing, bool can_record, bool rec_monitors_input)
 {
        int ret = Track::no_roll (nframes, start_frame, end_frame, state_changing, can_record, rec_monitors_input);
@@ -427,7 +431,7 @@ MidiTrack::push_midi_input_to_step_edit_ringbuffer (nframes_t nframes)
 }
 
 void
-MidiTrack::write_out_of_band_data (BufferSet& bufs, sframes_t /*start*/, sframes_t /*end*/, nframes_t nframes)
+MidiTrack::write_out_of_band_data (BufferSet& bufs, framepos_t /*start*/, framepos_t /*end*/, nframes_t nframes)
 {
        // Append immediate events
        MidiBuffer& buf (bufs.get_midi (0));
@@ -444,7 +448,7 @@ MidiTrack::write_out_of_band_data (BufferSet& bufs, sframes_t /*start*/, sframes
 }
 
 int
-MidiTrack::export_stuff (BufferSet& /*bufs*/, nframes_t /*nframes*/, sframes_t /*end_frame*/)
+MidiTrack::export_stuff (BufferSet& /*bufs*/, nframes_t /*nframes*/, framepos_t /*end_frame*/)
 {
        return -1;
 }
@@ -605,7 +609,7 @@ MidiTrack::set_midi_thru (bool yn)
 }
 
 boost::shared_ptr<SMFSource>
-MidiTrack::write_source (uint32_t n)
+MidiTrack::write_source (uint32_t)
 {
        return midi_diskstream()->write_source ();
 }
@@ -633,3 +637,10 @@ MidiTrack::midi_playlist ()
 {
        return midi_diskstream()->midi_playlist ();
 }
+
+void
+MidiTrack::diskstream_data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::weak_ptr<MidiSource> src)
+{
+       DataRecorded (buf, src); /* EMIT SIGNAL */
+}
+