return false;
}
- if (in != out) {
- /* currently no way to deliver different channels that we receive */
- return false;
- }
+ /* currently no way to deliver different channels that we receive */
+ out = in;
return true;
}
boost::shared_ptr<ChannelList> c = writer.get_copy();
uint32_t n_audio = in.n_audio();
+ bool changed = false;
if (n_audio > c->size()) {
add_channel_to (c, n_audio - c->size());
+ changed = true;
} else if (n_audio < c->size()) {
remove_channel_from (c, c->size() - n_audio);
+ changed = true;
}
if (in.n_midi() > 0 && !_midi_buf) {
const size_t size = _session.butler()->midi_diskstream_buffer_size();
_midi_buf = new MidiRingBuffer<framepos_t>(size);
midi_interpolation.add_channel_to (0,0);
+ changed = true;
}
- seek (_session.transport_frame());
+ if (changed) {
+ seek (_session.transport_frame());
+ }
return Processor::configure_io (in, out);
}
DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1: set to use playlist %2 (%3)\n", name(), playlist->name(), dt.to_string()));
if (playlist == _playlists[dt]) {
+ DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1: already using that playlist\n", name()));
return 0;
}
playlist->DropReferences.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_deleted, this, boost::weak_ptr<Playlist>(playlist)));
playlist->RangesMoved.connect_same_thread (playlist_connections, boost::bind (&DiskIOProcessor::playlist_ranges_moved, this, _1, _2));
- DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1 now use playlist %1 (%2)\n", name(), playlist->name(), playlist->id()));
+ DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1 now using playlist %1 (%2)\n", name(), playlist->name(), playlist->id()));
PlaylistChanged (dt); /* EMIT SIGNAL */
_session.set_dirty ();
capture_transition_buf = 0;
}
+void
+DiskIOProcessor::drop_route ()
+{
+ _route.reset ();
+}
+
void
DiskIOProcessor::set_route (boost::shared_ptr<Route> r)
{
_route = r;
+
+ if (_route) {
+ _route->DropReferences.connect_same_thread (*this, boost::bind (&DiskIOProcessor::drop_route, this));
+ }
}
/** Get the start, end, and length of a location "atomically".