summaryrefslogtreecommitdiff
path: root/libs/ardour/crossfade.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-20 16:09:42 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-20 16:09:42 +0000
commit3e8be2ca624575d7578c405e6df1bfffd4b34fae (patch)
tree887c7bec241f091ff6f7454be66d691a3eea5191 /libs/ardour/crossfade.cc
parent2592a320d42dd4a157ee16101c042d875d3142be (diff)
fixes for crossfade views, crossfades and undo/redo. added default crossfade settings to ardour.rc.in
git-svn-id: svn://localhost/ardour2/trunk@994 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/crossfade.cc')
-rw-r--r--libs/ardour/crossfade.cc22
1 files changed, 20 insertions, 2 deletions
diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc
index a197459971..1c4bdb6cad 100644
--- a/libs/ardour/crossfade.cc
+++ b/libs/ardour/crossfade.cc
@@ -37,6 +37,7 @@ using namespace PBD;
nframes_t Crossfade::_short_xfade_length = 0;
Change Crossfade::ActiveChanged = new_change();
+Change Crossfade::FollowOverlapChanged = new_change();
/* XXX if and when we ever implement parallel processing of the process()
callback, these will need to be handled on a per-thread basis.
@@ -82,8 +83,16 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> in, boost::shared_ptr<Audio
_length = length;
_position = position;
_anchor_point = ap;
- _follow_overlap = false;
- _active = true;
+
+ switch (Config->get_xfade_model()) {
+ case ShortCrossfade:
+ _follow_overlap = false;
+ break;
+ default:
+ _follow_overlap = true;
+ }
+
+ _active = Config->get_crossfades_active ();
_fixed = true;
initialize ();
@@ -188,6 +197,7 @@ Crossfade::Crossfade (const Crossfade &orig, boost::shared_ptr<AudioRegion> newi
Crossfade::~Crossfade ()
{
+ Invalidated (this);
}
void
@@ -795,6 +805,8 @@ Crossfade::set_follow_overlap (bool yn)
} else {
set_length (_out->first_frame() + _out->length() - _in->first_frame());
}
+
+ StateChanged (FollowOverlapChanged);
}
nframes_t
@@ -847,3 +859,9 @@ Crossfade::set_short_xfade_length (nframes_t n)
{
_short_xfade_length = n;
}
+
+void
+Crossfade::invalidate ()
+{
+ Invalidated (this); /* EMIT SIGNAL */
+}