From 15b5e07ec43c278fd3dbaf068ee3b2354ecd83c9 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 9 May 2012 22:31:07 +0000 Subject: [PATCH] change inverse fades when changing fade length git-svn-id: svn://localhost/ardour2/branches/3.0@12232 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/audioregion.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 40b3cac47c..e217783760 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -1137,10 +1137,17 @@ AudioRegion::set_fade_in_length (framecnt_t len) if (len > _length) { len = _length - 1; } + + if (len < 64) { + len = 64; + } bool changed = _fade_in->extend_to (len); if (changed) { + if (_inverse_fade_in) { + _inverse_fade_in->extend_to (len); + } _default_fade_in = false; send_change (PropertyChange (Properties::fade_in)); } @@ -1153,9 +1160,16 @@ AudioRegion::set_fade_out_length (framecnt_t len) len = _length - 1; } + if (len < 64) { + len = 64; + } + bool changed = _fade_out->extend_to (len); if (changed) { + if (_inverse_fade_out) { + _inverse_fade_out->extend_to (len); + } _default_fade_out = false; send_change (PropertyChange (Properties::fade_out)); }