From fedc155b94847b7d9c5cda36eb4c92bdb5d44929 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 4 Apr 2011 23:32:20 +0000 Subject: [PATCH] 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 --- libs/ardour/audioregion.cc | 4 ++-- 1 file 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*/, vectorread (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; }