diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-11-08 16:30:57 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-11-08 16:30:57 +0000 |
commit | 32b760d4c708a9d621d06aaa66e11e7c73d2e64d (patch) | |
tree | 88dbc524831a2a0a917f5281c51d3b74b34bcc88 /libs/ardour | |
parent | 5932ec19c4c2b00edcfc6068c637b39c007c904f (diff) |
fix for incorrect reading of fade in curve under a few circumstances
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4110 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/audioregion.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 4dd42214f3..307654a933 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -580,13 +580,13 @@ AudioRegion::_read_at (const SourceList& srcs, nframes_t limit, if (internal_offset < fade_in_length) { - nframes_t limit; + nframes_t fi_limit; - limit = min (to_read, fade_in_length - internal_offset); + fi_limit = min (to_read, fade_in_length - internal_offset); - _fade_in.get_vector (internal_offset, internal_offset+limit, gain_buffer, limit); + _fade_in.get_vector (internal_offset, internal_offset+fi_limit, gain_buffer, fi_limit); - for (nframes_t n = 0; n < limit; ++n) { + for (nframes_t n = 0; n < fi_limit; ++n) { mixdown_buffer[n] *= gain_buffer[n]; } } @@ -599,12 +599,12 @@ AudioRegion::_read_at (const SourceList& srcs, nframes_t limit, /* see if some part of this read is within the fade out */ /* ................. >| REGION - limit + limit { } FADE fade_out_length ^ - limit - fade_out_length + limit - fade_out_length |--------------| ^internal_offset ^internal_offset + to_read |