Fill extra channels if monitor sends have more outputs than
inputs (#4468). git-svn-id: svn://localhost/ardour2/branches/3.0@10708 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
bf3091f363
commit
db24dda7a2
@ -119,8 +119,26 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame
|
|||||||
} else {
|
} else {
|
||||||
if (role() == Listen) {
|
if (role() == Listen) {
|
||||||
/* We're going to the monitor bus, so discard MIDI data */
|
/* We're going to the monitor bus, so discard MIDI data */
|
||||||
assert (mixbufs.available().get (DataType::AUDIO) >= bufs.count().get (DataType::AUDIO));
|
|
||||||
mixbufs.read_from (bufs, nframes, DataType::AUDIO);
|
uint32_t const bufs_audio = bufs.count().get (DataType::AUDIO);
|
||||||
|
uint32_t const mixbufs_audio = mixbufs.count().get (DataType::AUDIO);
|
||||||
|
|
||||||
|
assert (mixbufs.available().get (DataType::AUDIO) >= bufs_audio);
|
||||||
|
|
||||||
|
/* Copy bufs into mixbufs, going round bufs more than once if necessary
|
||||||
|
to ensure that every mixbuf gets some data.
|
||||||
|
*/
|
||||||
|
|
||||||
|
uint32_t j = 0;
|
||||||
|
for (uint32_t i = 0; i < mixbufs_audio; ++i) {
|
||||||
|
mixbufs.get_audio(i).read_from (bufs.get_audio(j), nframes);
|
||||||
|
++j;
|
||||||
|
|
||||||
|
if (j == bufs_audio) {
|
||||||
|
j = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
assert (mixbufs.available() >= bufs.count());
|
assert (mixbufs.available() >= bufs.count());
|
||||||
mixbufs.read_from (bufs, nframes);
|
mixbufs.read_from (bufs, nframes);
|
||||||
|
Loading…
Reference in New Issue
Block a user