Merge libs/ardour and gtk2_ardour with 2.0-ongoing R2837.
[ardour.git] / libs / ardour / audio_diskstream.cc
index bc42cb0b5b5849c6c07c023ed6e8ac0a6fbf6541..bc4a352c45f1134e9ad1f30406f6c9db1a3a4b99 100644 (file)
@@ -850,10 +850,18 @@ AudioDiskstream::commit (nframes_t nframes)
        }
        
        if (_slaved) {
-               need_butler = c->front()->playback_buf->write_space() >= c->front()->playback_buf->bufsize() / 2;
+               /*if (_io && _io->active()) {*/
+                       need_butler = c->front()->playback_buf->write_space() >= c->front()->playback_buf->bufsize() / 2;
+               /*} else {
+                       need_butler = false;
+               }*/
        } else {
-               need_butler = c->front()->playback_buf->write_space() >= disk_io_chunk_frames
-                       || c->front()->capture_buf->read_space() >= disk_io_chunk_frames;
+               /*if (_io && _io->active()) {*/
+                       need_butler = c->front()->playback_buf->write_space() >= disk_io_chunk_frames
+                               || c->front()->capture_buf->read_space() >= disk_io_chunk_frames;
+               /*} else {
+                       need_butler = c->front()->capture_buf->read_space() >= disk_io_chunk_frames;
+               }*/
        }
 
        if (commit_should_unlock) {
@@ -1940,6 +1948,7 @@ AudioDiskstream::set_state (const XMLNode& node)
        if (nchans > _n_channels.n_audio()) {
 
                add_channel (nchans - _n_channels.n_audio());
+               IO::PortCountChanged(_n_channels);
 
        } else if (nchans < _n_channels.n_audio()) {