summaryrefslogtreecommitdiff
path: root/libs/ardour/disk_reader.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-02-20 01:17:14 +0100
committerRobin Gareus <robin@gareus.org>2020-02-20 01:57:11 +0100
commitc8f114612446b612ebe9f53da65b33e4f6adef0f (patch)
treea047dff2b20874badd345b28b8863fbf4a7019f6 /libs/ardour/disk_reader.cc
parent4337e2b0543c2e2183ca3c87caf924e247cd6213 (diff)
Revert "fix behavior of DiskReader when moved after an instrument"
This reverts commit b2bc934e218a8ed05b6f37edc5585191e60ca288. The commit does causes issues when a user manually removes channels: The disk-reader's ::can_support_io_configuration() at first ignores the user's request, forcing the output channel count to match the DR's current channel config. However, when configuring the DiskReader after that, channels is updated to match the new input-count. Even though the DR itself only plays back using the confgured I/O, all processors after it still use the old channel count. Only a later, second re-configuration step will apply the actual removal to plugins and port. PS. the original commit was mainly intended to fix a crash when adding an instrument plugin *between* disk-writer and disk-reader on a MIDI track.
Diffstat (limited to 'libs/ardour/disk_reader.cc')
-rw-r--r--libs/ardour/disk_reader.cc31
1 files changed, 1 insertions, 30 deletions
diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc
index ac07f23306..f204759db0 100644
--- a/libs/ardour/disk_reader.cc
+++ b/libs/ardour/disk_reader.cc
@@ -629,7 +629,7 @@ DiskReader::overwrite_existing_audio ()
boost::shared_ptr<ChannelList> c = channels.reader();
- if (c->empty () || !_playlists[DataType::AUDIO]) {
+ if (c->empty ()) {
return true;
}
@@ -1802,32 +1802,3 @@ DiskReader::reload_loop ()
}
}
-
-bool
-DiskReader::can_support_io_configuration (const ChanCount& in, ChanCount& out)
-{
- if (!DiskIOProcessor::can_support_io_configuration (in, out)) {
- return false;
- }
-
- /* DiskIO might have done this too, but do it again anyway as a
- * starting point.
- */
-
- out == in;
-
- if (_playlists[DataType::AUDIO]) {
- ChannelList::size_type naudio = max (ChannelList::size_type (1), channels.reader()->size());
- if (out.n_audio() < naudio) {
- out.set (DataType::AUDIO, naudio);
- }
- }
-
- if (_playlists[DataType::MIDI]) {
- if (out.n_midi() != 1) {
- out.set (DataType::MIDI, 1);
- }
- }
-
- return true;
-}