diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc index eff3e9761a..220849da0e 100644 --- a/gtk2_ardour/editor_export_audio.cc +++ b/gtk2_ardour/editor_export_audio.cc @@ -404,11 +404,12 @@ Editor::write_region (string path, boost::shared_ptr region) this_time = min (to_read, chunk_size); - for (vector >::iterator src=sources.begin(); src != sources.end(); ++src) { + uint32_t chn = 0; + for (vector >::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; }