summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-04-04 23:32:20 +0000
committerCarl Hetherington <carl@carlh.net>2011-04-04 23:32:20 +0000
commitfedc155b94847b7d9c5cda36eb4c92bdb5d44929 (patch)
treeda7bb26df7753ddbb5f4a87a0ecfb2b5cdbfb3e1 /libs
parent71222c2e6e4bc3f4e22668f70dba80e4a09cf0f2 (diff)
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
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/audioregion.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index fd98c602bb..447e4b8d95 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -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;
}