using namespace ARDOUR;
using namespace PBD;
-PBD::Signal1<void,bool> MidiTrack::StepEditStatusChange;
-
MidiTrack::MidiTrack (Session& sess, string name, Route::Flag flag, TrackMode mode)
: Track (sess, name, flag, mode, DataType::MIDI)
, _immediate_events(1024) // FIXME: size?
_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 */
}
}
- _main_outs->flush (nframes, end_frame - start_frame - 1);
+ _main_outs->flush_buffers (nframes, end_frame - start_frame - 1);
return 0;
}
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);
void
MidiTrack::handle_transport_stopped (bool abort, bool did_locate, bool flush_processors)
{
-
- _main_outs->transport_stopped ();
Route::handle_transport_stopped (abort, did_locate, flush_processors);
}
-
void
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));
}
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;
}
}
void
-MidiTrack::MidiControl::set_value(float val)
+MidiTrack::MidiControl::set_value(double val)
{
bool valid = false;
if (isinf(val)) {
}
boost::shared_ptr<SMFSource>
-MidiTrack::write_source (uint32_t n)
+MidiTrack::write_source (uint32_t)
{
return midi_diskstream()->write_source ();
}
{
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 */
+}
+