Revert "fix behavior of DiskReader when moved after an instrument"
This reverts commit b2bc934e21
.
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.
This commit is contained in:
parent
4337e2b054
commit
c8f1146124
@ -50,8 +50,6 @@ public:
|
|||||||
static samplecnt_t default_chunk_samples ();
|
static samplecnt_t default_chunk_samples ();
|
||||||
static void set_chunk_samples (samplecnt_t n) { _chunk_samples = n; }
|
static void set_chunk_samples (samplecnt_t n) { _chunk_samples = n; }
|
||||||
|
|
||||||
bool can_support_io_configuration (const ChanCount& in, ChanCount& out);
|
|
||||||
|
|
||||||
void run (BufferSet& /*bufs*/, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double speed, pframes_t /*nframes*/, bool /*result_required*/);
|
void run (BufferSet& /*bufs*/, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double speed, pframes_t /*nframes*/, bool /*result_required*/);
|
||||||
void realtime_handle_transport_stopped ();
|
void realtime_handle_transport_stopped ();
|
||||||
void realtime_locate (bool);
|
void realtime_locate (bool);
|
||||||
|
@ -629,7 +629,7 @@ DiskReader::overwrite_existing_audio ()
|
|||||||
|
|
||||||
boost::shared_ptr<ChannelList> c = channels.reader();
|
boost::shared_ptr<ChannelList> c = channels.reader();
|
||||||
|
|
||||||
if (c->empty () || !_playlists[DataType::AUDIO]) {
|
if (c->empty ()) {
|
||||||
return true;
|
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;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user