summaryrefslogtreecommitdiff
path: root/libs/ardour/filter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/filter.cc')
-rw-r--r--libs/ardour/filter.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/filter.cc b/libs/ardour/filter.cc
index afaf20dc4b..88a6e1d253 100644
--- a/libs/ardour/filter.cc
+++ b/libs/ardour/filter.cc
@@ -29,6 +29,7 @@
#include "ardour/region_factory.h"
#include "ardour/source_factory.h"
#include "ardour/analyser.h"
+#include "ardour/audioregion.h"
#include "i18n.h"
@@ -123,6 +124,12 @@ Filter::finish (boost::shared_ptr<Region> region, SourceList& nsrcs, string regi
boost::shared_ptr<Region> r = RegionFactory::create (nsrcs, 0, region->length(), region_name, 0,
Region::Flag (Region::WholeFile|Region::DefaultFlags));
r->set_position (region->position(), 0);
+
+ boost::shared_ptr<AudioRegion> audio_region = boost::dynamic_pointer_cast<AudioRegion> (region);
+ boost::shared_ptr<AudioRegion> audio_r = boost::dynamic_pointer_cast<AudioRegion> (r);
+ if (audio_region && audio_r) {
+ audio_r->set_scale_amplitude (audio_region->scale_amplitude());
+ }
results.push_back (r);
return 0;