#include "ardour/amp.h"
#include "ardour/buffer_set.h"
+#include "ardour/delivery.h"
#include "ardour/io_processor.h"
#include "ardour/meter.h"
#include "ardour/midi_diskstream.h"
_freeze_record.state = NoFreeze;
_saved_meter_point = _meter_point;
_mode = mode;
-
- set_input_minimum(ChanCount(DataType::MIDI, 1));
- set_input_maximum(ChanCount(DataType::MIDI, 1));
}
MidiTrack::MidiTrack (Session& sess, const XMLNode& node)
, _note_mode(Sustained)
{
_set_state(node, false);
-
- set_input_minimum(ChanCount(DataType::MIDI, 1));
- set_input_maximum(ChanCount(DataType::MIDI, 1));
}
MidiTrack::~MidiTrack ()
MidiTrack::set_diskstream (boost::shared_ptr<MidiDiskstream> ds)
{
_diskstream = ds;
- _diskstream->set_io (*this);
+ _diskstream->set_route (*this);
_diskstream->set_destructive (_mode == Destructive);
_diskstream->set_record_enabled (false);
//_diskstream->monitor_input (false);
ic_connection.disconnect();
- ic_connection = input_changed.connect (mem_fun (*_diskstream, &MidiDiskstream::handle_input_change));
+ ic_connection = _input->changed.connect (mem_fun (*_diskstream, &MidiDiskstream::handle_input_change));
DiskstreamChanged (); /* EMIT SIGNAL */
{
boost::shared_ptr<MidiDiskstream> dstream;
+ cerr << "\n\n\nMIDI use diskstream\n";
+
if ((dstream = boost::dynamic_pointer_cast<MidiDiskstream>(_session.diskstream_by_name (name))) == 0) {
error << string_compose(_("MidiTrack: midi diskstream \"%1\" not known by session"), name) << endmsg;
return -1;
}
+ cerr << "\n\n\nMIDI found DS\n";
return set_diskstream (dstream);
}
that means "you should create a new diskstream here, not look for
an old one.
*/
+
+ cerr << "\n\n\n\n MIDI track " << name() << " found DS id " << id << endl;
if (id == zero) {
use_new_diskstream ();
int dret;
boost::shared_ptr<MidiDiskstream> diskstream = midi_diskstream();
- prepare_inputs (nframes);
-
{
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
if (lm.locked()) {
/* special condition applies */
if (_meter_point == MeterInput) {
- just_meter_input (start_frame, end_frame, nframes);
+ _input->process_input (_meter, start_frame, end_frame, nframes);
}
if (diskstream->record_enabled() && !can_record && !_session.config.get_auto_input()) {
}
- flush_outputs (nframes);
+ _main_outs->flush (nframes);
return 0;
}
void
-MidiTrack::write_controller_messages(MidiBuffer& output_buf, sframes_t start, sframes_t end, nframes_t nframes)
+MidiTrack::write_controller_messages(MidiBuffer& output_buf, sframes_t /*start*/, sframes_t /*end*/, nframes_t nframes)
{
// Append immediate events (UI controls)
}
int
-MidiTrack::export_stuff (BufferSet& bufs, nframes_t nframes, sframes_t end_frame)
+MidiTrack::export_stuff (BufferSet& /*bufs*/, nframes_t /*nframes*/, sframes_t /*end_frame*/)
{
return -1;
}
}
boost::shared_ptr<Region>
-MidiTrack::bounce (InterThreadInfo& itt)
+MidiTrack::bounce (InterThreadInfo& /*itt*/)
{
throw;
// vector<MidiSource*> srcs;
boost::shared_ptr<Region>
-MidiTrack::bounce_range (nframes_t start, nframes_t end, InterThreadInfo& itt, bool enable_processing)
+MidiTrack::bounce_range (nframes_t /*start*/, nframes_t /*end*/, InterThreadInfo& /*itt*/, bool /*enable_processing*/)
{
throw;
//vector<MidiSource*> srcs;
}
void
-MidiTrack::freeze (InterThreadInfo& itt)
+MidiTrack::freeze (InterThreadInfo& /*itt*/)
{
}