do not crash when loading old history files with MIDI edits; add all notes in region...
[ardour.git] / libs / ardour / crossfade.cc
index 8aad53765a004d316ef6778f6274f9abb941718b..86d509ec664c9799192ff859563852ace9c16f8e 100644 (file)
@@ -83,7 +83,7 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> in, boost::shared_ptr<Audio
        _anchor_point = ap;
        _follow_overlap = false;
 
-       _active = Config->get_xfades_active ();
+       _active = _session.config.get_xfades_active ();
        _fixed = true;
 
        initialize ();
@@ -96,6 +96,7 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioR
 {
        _in_update = false;
        _fixed = false;
+       _follow_overlap = false;
 
        if (compute (a, b, model)) {
                throw failed_constructor();
@@ -104,8 +105,6 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioR
        _active = act;
 
        initialize ();
-
-
 }
 
 Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
@@ -271,7 +270,7 @@ Crossfade::initialize ()
 }      
 
 nframes_t 
-Crossfade::read_raw_internal (Sample* buf, sframes_t start, nframes_t cnt) const
+Crossfade::read_raw_internal (Sample* /*buf*/, sframes_t /*start*/, nframes_t cnt, int /*channel*/) const
 {
        // FIXME: Why is this disabled?
 #if 0
@@ -409,7 +408,7 @@ Crossfade::refresh ()
 
        int32_t new_layer_relation = (int32_t) (_in->layer() - _out->layer());
 
-       if (new_layer_relation * layer_relation < 0) { // different sign, layers rotated 
+       if (new_layer_relation * layer_relation < 0) { // different sign, layers rotated
                Invalidated (shared_from_this ());
                return false;
        }
@@ -428,7 +427,7 @@ Crossfade::refresh ()
                if (_follow_overlap) {
 
                        try {
-                               compute (_in, _out, Config->get_xfade_model());
+                               compute (_in, _out, _session.config.get_xfade_model());
                        } 
 
                        catch (NoCrossfadeHere& err) {
@@ -439,7 +438,6 @@ Crossfade::refresh ()
                        send_signal = true;
 
                } else {
-
                        Invalidated (shared_from_this ());
                        return false;
                }
@@ -927,9 +925,3 @@ Crossfade::set_short_xfade_length (nframes_t n)
 {
        _short_xfade_length = n;
 }
-
-void
-Crossfade::invalidate ()
-{
-       Invalidated (shared_from_this ()); /* EMIT SIGNAL */
-}