summaryrefslogtreecommitdiff
path: root/libs/ardour/diskstream.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-03-15 19:32:21 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-03-15 19:32:21 +0000
commitc4c40340855dff6191a670d3130d65b1e79dc8a0 (patch)
tree91c79d2dd3c4bb3e2f53c5d303c4ef0877c38526 /libs/ardour/diskstream.cc
parenteee943304c8d7afbb7c92e200670a1ee01c34ab5 (diff)
fix all manner of things relating to io connections, setting capture alignment, and so on. still needs more tests of actual precise placement of newly recorded material
git-svn-id: svn://localhost/ardour2/branches/3.0@9155 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/diskstream.cc')
-rw-r--r--libs/ardour/diskstream.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc
index ae4a8ada3e..affda7b56a 100644
--- a/libs/ardour/diskstream.cc
+++ b/libs/ardour/diskstream.cc
@@ -180,9 +180,8 @@ Diskstream::set_track (Track* t)
ic_connection.disconnect();
_io->changed.connect_same_thread (ic_connection, boost::bind (&Diskstream::handle_input_change, this, _1, _2));
- input_change_pending = IOChange::ConfigurationChanged;
+ input_change_pending.type = IOChange::Type (IOChange::ConfigurationChanged|IOChange::ConnectionsChanged);
non_realtime_input_change ();
- set_align_style_from_io ();
_track->Destroyed.connect_same_thread (*this, boost::bind (&Diskstream::route_going_away, this));
}
@@ -192,7 +191,14 @@ Diskstream::handle_input_change (IOChange change, void * /*src*/)
{
Glib::Mutex::Lock lm (state_lock);
- if (change.type & IOChange::ConfigurationChanged) {
+ if (change.type & (IOChange::ConfigurationChanged|IOChange::ConnectionsChanged)) {
+
+ /* rather than handle this here on a DS-by-DS basis we defer to the
+ session transport/butler thread, and let it tackle
+ as many diskstreams as need it in one shot. this avoids many repeated
+ takings of the audioengine process lock.
+ */
+
if (!(input_change_pending.type & change.type)) {
input_change_pending.type = IOChange::Type (input_change_pending.type | change.type);
_session.request_input_change_handling ();