13
0

Make _read_at take notice of its srcs parameter; fixes part of #3908.

git-svn-id: svn://localhost/ardour2/branches/3.0@9900 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-07-19 00:22:08 +00:00
parent 711d344188
commit 79898b7aa7

View File

@ -369,7 +369,7 @@ AudioRegion::master_read_at (Sample *buf, Sample *mixdown_buffer, float *gain_bu
}
framecnt_t
AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
AudioRegion::_read_at (const SourceList& srcs, framecnt_t limit,
Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
framepos_t position,
framecnt_t cnt,
@ -421,7 +421,7 @@ AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
if (chan_n < n_channels()) {
boost::shared_ptr<AudioSource> src = audio_source(chan_n);
boost::shared_ptr<AudioSource> src = boost::dynamic_pointer_cast<AudioSource> (srcs[chan_n]);
if (src->read (mixdown_buffer, _start + internal_offset, to_read) != to_read) {
return 0; /* "read nothing" */
}
@ -441,7 +441,7 @@ AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
*/
uint32_t channel = n_channels() % chan_n;
boost::shared_ptr<AudioSource> src = audio_source (channel);
boost::shared_ptr<AudioSource> src = boost::dynamic_pointer_cast<AudioSource> (srcs[channel]);
if (src->read (mixdown_buffer, _start + internal_offset, to_read) != to_read) {
return 0; /* "read nothing" */