X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fcrossfade.h;h=d29ba47056f2e4bf8c8854ce3b85e258d81bfdf2;hb=1bd4c5b3a212460eed1773f6b049d18c89625565;hp=7fd7323b365d955bf2bb6cd7b47a742a6508c044;hpb=93c7aeba048f19df5abee5e4325ef8b0ef62c279;p=ardour.git diff --git a/libs/ardour/ardour/crossfade.h b/libs/ardour/ardour/crossfade.h index 7fd7323b36..d29ba47056 100644 --- a/libs/ardour/ardour/crossfade.h +++ b/libs/ardour/ardour/crossfade.h @@ -33,7 +33,6 @@ #include #include #include -#include #include namespace ARDOUR { @@ -41,19 +40,7 @@ namespace ARDOUR { class AudioRegion; class Playlist; -struct CrossfadeState : public StateManager::State { - CrossfadeState (std::string reason) : StateManager::State (reason) {} - - UndoAction fade_in_memento; - UndoAction fade_out_memento; - nframes_t position; - nframes_t length; - AnchorPoint anchor_point; - bool follow_overlap; - bool active; -}; - -class Crossfade : public PBD::StatefulDestructible, public StateManager +class Crossfade : public PBD::StatefulDestructible { public: @@ -121,7 +108,10 @@ class Crossfade : public PBD::StatefulDestructible, public StateManager nframes_t overlap_length() const; nframes_t position() const { return _position; } + void invalidate(); + sigc::signal Invalidated; + sigc::signal StateChanged; bool covers (nframes_t frame) const { return _position <= frame && frame < _position + _length; @@ -129,8 +119,6 @@ class Crossfade : public PBD::StatefulDestructible, public StateManager OverlapType coverage (nframes_t start, nframes_t end) const; - UndoAction get_memento() const; - static void set_buffer_size (nframes_t); bool active () const { return _active; } @@ -149,6 +137,7 @@ class Crossfade : public PBD::StatefulDestructible, public StateManager static void set_short_xfade_length (nframes_t n); static Change ActiveChanged; + static Change FollowOverlapChanged; private: friend struct CrossfadeComparePtr; @@ -172,15 +161,11 @@ class Crossfade : public PBD::StatefulDestructible, public StateManager static Sample* crossfade_buffer_out; static Sample* crossfade_buffer_in; - void initialize (bool savestate=true); + void initialize (); int compute (boost::shared_ptr, boost::shared_ptr, CrossfadeModel); bool update (bool force); - StateManager::State* state_factory (std::string why) const; - Change restore_state (StateManager::State&); - void member_changed (ARDOUR::Change); - };