+
+boost::shared_ptr<MidiPlaylist>
+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 */
+}
+
+bool
+MidiTrack::should_monitor () const
+{
+ return true;
+}
+
+bool
+MidiTrack::send_silence () const
+{
+ return false;
+}
+
+bool
+MidiTrack::input_active () const
+{
+ return _input_active;
+}
+
+void
+MidiTrack::set_input_active (bool yn)
+{
+ if (yn != _input_active) {
+ _input_active = yn;
+ map_input_active (yn);
+ InputActiveChanged (); /* EMIT SIGNAL */
+ }
+}
+
+void
+MidiTrack::map_input_active (bool yn)
+{
+ if (!_input) {
+ return;
+ }
+
+ PortSet& ports (_input->ports());
+
+ for (PortSet::iterator p = ports.begin(DataType::MIDI); p != ports.end(DataType::MIDI); ++p) {
+ MidiPort* mp = dynamic_cast<MidiPort*> (&*p);
+ if (yn != mp->input_active()) {
+ mp->set_input_active (yn);
+ }
+ }
+}
+
+void
+MidiTrack::track_input_active (IOChange change, void* /* src */)
+{
+ if (change.type & IOChange::ConfigurationChanged) {
+ map_input_active (_input_active);
+ }
+}
+