diff options
author | Carl Hetherington <carl@carlh.net> | 2010-10-28 17:09:32 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-10-28 17:09:32 +0000 |
commit | 6f9e9ad23e98ac1b3f52065ad53641cbf4c38f22 (patch) | |
tree | 9db23782df87668152fbdf6f16a03651733ec511 /libs/ardour/audioregion.cc | |
parent | d731e4dba1109ba641cea132c004dad71cbc4268 (diff) |
Make normalize cancel button work.
git-svn-id: svn://localhost/ardour2/branches/3.0@7935 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audioregion.cc')
-rw-r--r-- | libs/ardour/audioregion.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 1461e1a3a4..be3b80de87 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -1143,7 +1143,9 @@ AudioRegion::set_scale_amplitude (gain_t g) send_change (PropertyChange (Properties::scale_amplitude)); } -/** @return the maximum (linear) amplitude of the region */ +/** @return the maximum (linear) amplitude of the region, or a -ve + * number if the Progress object reports that the process was cancelled. + */ double AudioRegion::maximum_amplitude (Progress* p) const { @@ -1173,6 +1175,9 @@ AudioRegion::maximum_amplitude (Progress* p) const fpos += to_read; p->set_progress (float (fpos - _start) / _length); + if (p->cancelled ()) { + return -1; + } } return maxamp; |