fix behavior of DiskReader when moved after an instrument
This commit is contained in:
parent
1881d73f43
commit
b2bc934e21
@ -50,6 +50,8 @@ public:
|
||||
static samplecnt_t default_chunk_samples ();
|
||||
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 realtime_handle_transport_stopped ();
|
||||
void realtime_locate (bool);
|
||||
|
@ -536,7 +536,7 @@ DiskReader::overwrite_existing_audio ()
|
||||
{
|
||||
boost::shared_ptr<ChannelList> c = channels.reader();
|
||||
|
||||
if (c->empty ()) {
|
||||
if (c->empty () || !_playlists[DataType::AUDIO]) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1683,3 +1683,32 @@ 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