13
0

Fix Editor::write_region for multi-channel regions

This method, and ::write_selection() is currently unused.
It should perhaps be removed after dome discussion.
This commit is contained in:
Robin Gareus 2022-01-28 02:01:23 +01:00
parent ec6cd4539d
commit b7bbb27c7c
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -404,11 +404,12 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
this_time = min (to_read, chunk_size);
for (vector<boost::shared_ptr<AudioFileSource> >::iterator src=sources.begin(); src != sources.end(); ++src) {
uint32_t chn = 0;
for (vector<boost::shared_ptr<AudioFileSource> >::iterator src=sources.begin(); src != sources.end(); ++src, ++chn) {
fs = (*src);
if (region->read_at (buf, buf, gain_buffer, pos, this_time) != this_time) {
if (region->read_at (buf, buf, gain_buffer, pos, this_time, chn) != this_time) {
break;
}