13
0

Yet another export fix (amend a529122249)

This commit is contained in:
Robin Gareus 2020-11-22 20:44:45 +01:00
parent 132e6f5076
commit da4d1cd779
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -127,7 +127,8 @@ PortExportChannel::read (Sample const *& data, samplecnt_t samples) const
samplecnt_t to_write = std::min (samples, (samplecnt_t) vec.len[0]); samplecnt_t to_write = std::min (samples, (samplecnt_t) vec.len[0]);
mix_buffers_no_gain (&_buffer[0], vec.buf[0], to_write); mix_buffers_no_gain (&_buffer[0], vec.buf[0], to_write);
to_write = std::min (to_write - samples, (samplecnt_t) vec.len[1]);
to_write = std::min (samples - to_write, (samplecnt_t) vec.len[1]);
if (to_write > 0) { if (to_write > 0) {
mix_buffers_no_gain (&_buffer[vec.len[0]], vec.buf[1], to_write); mix_buffers_no_gain (&_buffer[vec.len[0]], vec.buf[1], to_write);
} }