Fix logic so that soloing a bus does not mute things that feed it.
[ardour.git] / libs / ardour / midi_diskstream.cc
index f61211def8bf94efdd282d4d114e9f3ea600d4d4..18d3bc5ce30681fe5d7df762a970b7247f3d2601 100644 (file)
@@ -53,6 +53,7 @@
 #include "ardour/session.h"
 #include "ardour/smf_source.h"
 #include "ardour/utils.h"
+#include "ardour/session_playlists.h"
 
 #include "midi++/types.h"
 
@@ -220,7 +221,7 @@ MidiDiskstream::find_and_use_playlist (const string& name)
 {
        boost::shared_ptr<MidiPlaylist> playlist;
 
-       if ((playlist = boost::dynamic_pointer_cast<MidiPlaylist> (_session.playlist_by_name (name))) == 0) {
+       if ((playlist = boost::dynamic_pointer_cast<MidiPlaylist> (_session.playlists->by_name (name))) == 0) {
                playlist = boost::dynamic_pointer_cast<MidiPlaylist> (PlaylistFactory::create (DataType::MIDI, _session, name));
        }
 
@@ -1023,7 +1024,7 @@ MidiDiskstream::transport_stopped (struct tm& /*when*/, time_t /*twhen*/, bool a
                                continue; /* XXX is this OK? */
                        }
 
-                       region->GoingAway.connect (bind (mem_fun (*this, &Diskstream::remove_region_from_last_capture), boost::weak_ptr<Region>(region)));
+                       region->DropReferences.connect_same_thread (*this, boost::bind (&Diskstream::remove_region_from_last_capture, this, boost::weak_ptr<Region>(region)));
 
                        _last_capture_regions.push_back (region);
 
@@ -1128,15 +1129,6 @@ MidiDiskstream::set_record_enabled (bool yn)
 
        assert(!destructive());
 
-       if (yn && _source_port == 0) {
-
-               /* pick up connections not initiated *from* the IO object
-                  we're associated with.
-               */
-
-               get_input_sources ();
-       }
-
        /* yes, i know that this not proof against race conditions, but its
           good enough. i think.
        */
@@ -1223,7 +1215,7 @@ MidiDiskstream::get_state ()
                if (_session.config.get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) {
                        snprintf (buf, sizeof (buf), "%" PRId64, pi->start());
                } else {
-                       snprintf (buf, sizeof (buf), "%" PRIu32, _session.transport_frame());
+                       snprintf (buf, sizeof (buf), "%" PRId64, _session.transport_frame());
                }
 
                cs_child->add_property (X_("at"), buf);