use new ControlList::add() argument
[ardour.git] / libs / ardour / audioregion.cc
index 0909140f91be8db7e0500c6fd23141706002af02..331de043cda7cc62cba212b59b726372786e9465 100644 (file)
@@ -744,7 +744,7 @@ AudioRegion::read_from_sources (SourceList const & srcs, framecnt_t limit, Sampl
 
                        /* copy an existing channel's data in for this non-existant one */
 
-                       uint32_t channel = n_channels() % chan_n;
+                       uint32_t channel = chan_n % n_channels();
                        boost::shared_ptr<AudioSource> src = boost::dynamic_pointer_cast<AudioSource> (srcs[channel]);
 
                        if (src->read (buf, _start + internal_offset, to_read) != to_read) {