13
0

Fix read_raw_internal to use the appropriate audio source for the specified channel, and fix maximum_amplitude to check all channels of a region rather than just the first. Fixes #3933.

git-svn-id: svn://localhost/ardour2/branches/3.0@9290 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-04-04 23:32:20 +00:00
parent 71222c2e6e
commit fedc155b94

View File

@ -1080,7 +1080,7 @@ AudioRegion::separate_by_channel (Session& /*session*/, vector<boost::shared_ptr
framecnt_t
AudioRegion::read_raw_internal (Sample* buf, framepos_t pos, framecnt_t cnt, int channel) const
{
return audio_source()->read (buf, pos, cnt, channel);
return audio_source(channel)->read (buf, pos, cnt);
}
int
@ -1190,7 +1190,7 @@ AudioRegion::maximum_amplitude (Progress* p) const
/* read it in */
if (read_raw_internal (buf, fpos, to_read, 0) != to_read) {
if (read_raw_internal (buf, fpos, to_read, n) != to_read) {
return 0;
}