rework Stateful::set_state() patch to avoid default version argument
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 15 Oct 2009 18:56:11 +0000 (18:56 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 15 Oct 2009 18:56:11 +0000 (18:56 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@5787 d708f5d6-7413-0410-9779-e7cbd77b26cf

120 files changed:
gtk2_ardour/audio_time_axis.cc
gtk2_ardour/automation_line.cc
gtk2_ardour/automation_line.h
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/automation_time_axis.h
gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/keyboard.cc
gtk2_ardour/keyboard.h
gtk2_ardour/midi_time_axis.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/route_time_axis.h
gtk2_ardour/session_metadata_dialog.cc
gtk2_ardour/time_axis_view.h
gtk2_ardour/ui_config.cc
gtk2_ardour/ui_config.h
libs/ardour/amp.cc
libs/ardour/ardour/amp.h
libs/ardour/ardour/audio_diskstream.h
libs/ardour/ardour/audio_track.h
libs/ardour/ardour/audiofilesource.h
libs/ardour/ardour/audioplaylist.h
libs/ardour/ardour/audioregion.h
libs/ardour/ardour/audiosource.h
libs/ardour/ardour/automation_list.h
libs/ardour/ardour/control_protocol_manager.h
libs/ardour/ardour/crossfade.h
libs/ardour/ardour/delivery.h
libs/ardour/ardour/diskstream.h
libs/ardour/ardour/file_source.h
libs/ardour/ardour/internal_return.h
libs/ardour/ardour/internal_send.h
libs/ardour/ardour/io.h
libs/ardour/ardour/io_processor.h
libs/ardour/ardour/ladspa_plugin.h
libs/ardour/ardour/location.h
libs/ardour/ardour/lv2_plugin.h
libs/ardour/ardour/midi_diskstream.h
libs/ardour/ardour/midi_model.h
libs/ardour/ardour/midi_playlist.h
libs/ardour/ardour/midi_region.h
libs/ardour/ardour/midi_source.h
libs/ardour/ardour/midi_track.h
libs/ardour/ardour/mute_master.h
libs/ardour/ardour/named_selection.h
libs/ardour/ardour/panner.h
libs/ardour/ardour/playlist.h
libs/ardour/ardour/plugin_insert.h
libs/ardour/ardour/port_insert.h
libs/ardour/ardour/processor.h
libs/ardour/ardour/rc_configuration.h
libs/ardour/ardour/region.h
libs/ardour/ardour/return.h
libs/ardour/ardour/route.h
libs/ardour/ardour/route_group.h
libs/ardour/ardour/send.h
libs/ardour/ardour/session.h
libs/ardour/ardour/session_configuration.h
libs/ardour/ardour/session_metadata.h
libs/ardour/ardour/smf_source.h
libs/ardour/ardour/source.h
libs/ardour/ardour/tempo.h
libs/ardour/ardour/track.h
libs/ardour/ardour/user_bundle.h
libs/ardour/audio_diskstream.cc
libs/ardour/audio_playlist.cc
libs/ardour/audio_track.cc
libs/ardour/audiofilesource.cc
libs/ardour/audioregion.cc
libs/ardour/audiosource.cc
libs/ardour/automation_list.cc
libs/ardour/control_protocol_manager.cc
libs/ardour/crossfade.cc
libs/ardour/delivery.cc
libs/ardour/globals.cc
libs/ardour/internal_return.cc
libs/ardour/internal_send.cc
libs/ardour/io.cc
libs/ardour/io_processor.cc
libs/ardour/location.cc
libs/ardour/lv2_plugin.cc
libs/ardour/midi_diskstream.cc
libs/ardour/midi_model.cc
libs/ardour/midi_playlist.cc
libs/ardour/midi_region.cc
libs/ardour/midi_source.cc
libs/ardour/midi_track.cc
libs/ardour/panner.cc
libs/ardour/playlist.cc
libs/ardour/plugin_insert.cc
libs/ardour/port_insert.cc
libs/ardour/processor.cc
libs/ardour/rc_configuration.cc
libs/ardour/region.cc
libs/ardour/return.cc
libs/ardour/route.cc
libs/ardour/send.cc
libs/ardour/session.cc
libs/ardour/session_command.cc
libs/ardour/session_state.cc
libs/ardour/smf_source.cc
libs/ardour/source.cc
libs/ardour/tempo_map_importer.cc
libs/ardour/track.cc
libs/ardour/user_bundle.cc
libs/ardour/wscript
libs/midi++2/midi++/midnam_patch.h
libs/midi++2/midnam_patch.cc
libs/pbd/pbd/command.h
libs/pbd/pbd/controllable.h
libs/pbd/pbd/memento_command.h
libs/pbd/pbd/stateful.h
libs/pbd/stateful.cc
libs/surfaces/generic_midi/generic_midi_control_protocol.cc
libs/surfaces/generic_midi/generic_midi_control_protocol.h
libs/surfaces/generic_midi/midicontrollable.h
libs/surfaces/mackie/mackie_control_protocol.h
libs/surfaces/osc/osc.h
libs/surfaces/osc/osc_controllable.h
libs/surfaces/powermate/powermate.h

index 7f239f4e6780f8a400158ee15bee4d77c8b40876..281bedafe1b2173b8271808b1bea1459ed4bb194 100644 (file)
@@ -100,7 +100,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
 
        ensure_xml_node ();
 
-       set_state (*xml_node);
+       set_state (*xml_node, Stateful::loading_state_version);
 
        /* if set_state above didn't create a gain automation child, we need to make one */
        if (automation_track (GainAutomation) == 0) {
index 73727ca987ad87649a46438f0ae687a833bdd945..3e89826cad2d4fb7bd0039bfc0c3f910083be0e9 100644 (file)
@@ -1264,7 +1264,7 @@ int
 AutomationLine::set_state (const XMLNode &node, int version)
 {
        /* function as a proxy for the model */
-       return alist->set_state (node);
+       return alist->set_state (node, version);
 }
 
 void
index 817f66c1d2cadb2e992cf2805c53601e9dc4985d..c8c265c30715ea843b4122e1526fe3a24a07d0b8 100644 (file)
@@ -125,7 +125,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
        bool is_first_point (ControlPoint &);
 
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        void set_colors();
 
        void modify_point_y (ControlPoint&, double);
index 1fffe564fb00249c9971582a8b69cffe111f68b4..e18ab441bcf8c449e3f1cc0608a3cbc40f3ad4f8 100644 (file)
@@ -194,7 +194,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
                        _control->parameter());
 
        if (xml_node) {
-               set_state (*xml_node);
+               set_state (*xml_node, Stateful::loading_state_version);
        }
 
        /* ask for notifications of any new RegionViews */
@@ -867,7 +867,7 @@ AutomationTimeAxisView::color_handler ()
 int
 AutomationTimeAxisView::set_state (const XMLNode& node, int version)
 {
-       TimeAxisView::set_state (node);
+       TimeAxisView::set_state (node, version);
 
        XMLProperty const * type = node.property ("automation-id");
        if (type && type->value () == ARDOUR::EventTypeMap::instance().to_symbol (_control->parameter())) {
index f6239314abdfde6381f93c50a47ed17fcc048883..f4d71f93c22e96a42dc2a439e816d402321e6603 100644 (file)
@@ -90,7 +90,7 @@ class AutomationTimeAxisView : public TimeAxisView {
        bool paste (nframes_t, float times, Selection&, size_t nth);
        void reset_objects (PointSelection&);
 
-       int  set_state (const XMLNode&, int version = 3000);
+       int  set_state (const XMLNode&, int version);
        guint32 show_at (double y, int& nth, Gtk::VBox *parent);
        void hide ();
 
index fec836210c65c4c332f319cd2b38ead7596079ab..daeb5aa23fdc14820f8db7db021ca53a03d97c8f 100644 (file)
@@ -614,7 +614,7 @@ Editor::Editor ()
        set_edit_point_preference (EditAtMouse, true);
 
        XMLNode* node = ARDOUR_UI::instance()->editor_settings();
-       set_state (*node);
+       set_state (*node, Stateful::loading_state_version);
 
        _playlist_selector = new PlaylistSelector();
        _playlist_selector->signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (_playlist_selector)));
@@ -1061,7 +1061,7 @@ Editor::connect_to_session (Session *t)
        sensitize_the_right_region_actions (false);
 
        XMLNode* node = ARDOUR_UI::instance()->editor_settings();
-       set_state (*node);
+       set_state (*node, Stateful::loading_state_version);
 
        /* catch up with the playhead */
 
@@ -4245,7 +4245,7 @@ Editor::use_visual_state (VisualState& vs)
                /* check if the track still exists - it could have been deleted */
 
                if ((t = find (track_views.begin(), track_views.end(), i->first)) != track_views.end()) {
-                       (*t)->set_state (*(i->second));
+                       (*t)->set_state (*(i->second), Stateful::loading_state_version);
                }
        }
 
index f2779d353c7522d974aa553057d174385b86a2fc..34d402c049717f78edf52ea718b0283b9cd4398f 100644 (file)
@@ -180,7 +180,7 @@ class Editor : public PublicEditor
        void redo (uint32_t n = 1);
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        void set_mouse_mode (Editing::MouseMode, bool force=true);
        void step_mouse_mode (bool next);
index 9333f15b5127991c96e99e72c5257e69dbc89c01..635ac8137c6df8fd30012446340456df092e952e 100644 (file)
@@ -129,7 +129,7 @@ Keyboard::Keyboard ()
        snooper_id = gtk_key_snooper_install (_snooper, (gpointer) this);
 
        XMLNode* node = ARDOUR_UI::instance()->keyboard_settings();
-       set_state (*node);
+       set_state (*node, Stateful::loading_state_version);
 }
 
 Keyboard::~Keyboard ()
index 9f354f38e38d015f372bff5a365d7da765fabea4..e34c424329f3e0761ffd5325be2d7421b8d86b28 100644 (file)
@@ -40,7 +40,7 @@ class Keyboard : public sigc::trackable, PBD::Stateful
        ~Keyboard ();
 
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        typedef std::vector<uint32_t> State;
        typedef uint32_t ModifierMask;
index 8460b6ab370f084949e1e72f1cf6fd95996d5623..6aaf33854c7a48d19b9a1dfbb5162a084dd76cca 100644 (file)
@@ -136,7 +136,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess,
 
        ensure_xml_node ();
 
-       set_state (*xml_node);
+       set_state (*xml_node, Stateful::loading_state_version);
 
        _route->processors_changed.connect (mem_fun(*this, &MidiTimeAxisView::processors_changed));
 
index 52eceb2058f4089b6a37f5fa0b37d0d1fb4d4391..e21e1f734a5e3e7ecced258c3f5ab0b222149f7e 100644 (file)
@@ -385,7 +385,7 @@ RouteTimeAxisView::automation_click ()
 int
 RouteTimeAxisView::set_state (const XMLNode& node, int version)
 {
-       TimeAxisView::set_state (node);
+       TimeAxisView::set_state (node, version);
 
        XMLNodeList kids = node.children();
        XMLNodeConstIterator iter;
index 7ca88aefd4a35f38856b9f306cdd2ca5466058aa..19715fe99d5142f03d367eb026be940d59145feb 100644 (file)
@@ -114,7 +114,7 @@ public:
        void remove_underlay (StreamView*);
        void build_underlay_menu(Gtk::Menu*);
        
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        
        /* This is a bit nasty to expose :/ */
        struct RouteAutomationNode {
index be2e6fe0121b5fe34b8f1f8c1551ab1f3b7ce520..62ea31918c665882a7c848b7524358c1812e321f 100644 (file)
@@ -709,6 +709,9 @@ SessionMetadataImporter::run ()
                return;
        }
 
+       /* XXX GET VERSION FROM TREE */
+       int version = 3000;
+
        XMLNode * node = session_tree.root()->child ("Metadata");
 
        if (!node) {
@@ -717,7 +720,7 @@ SessionMetadataImporter::run ()
        }
 
        ARDOUR::SessionMetadata data;
-       data.set_state (*node);
+       data.set_state (*node, version);
 
        init_data ();
        load_extra_data (data);
index 1597e32a5549761c514838c2e2b1167fc0c1a814..e8860cb907840ed772d5dbf950e13b28681f4abb 100644 (file)
@@ -93,7 +93,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
        virtual ~TimeAxisView ();
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        /** @return index of this TimeAxisView within its parent */
        int order () const { return _order; }
index 1f1f25f239f9ccf6533a4ad474a43a97868cdeb1..d0878073b7f8b08cdc3e3490b8b4210cf0da6005 100644 (file)
@@ -86,7 +86,7 @@ UIConfiguration::load_defaults ()
                        return -1;
                }
 
-               if (set_state (*tree.root())) {
+               if (set_state (*tree.root(), Stateful::loading_state_version)) {
                        error << string_compose(_("Ardour: default ui configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
                        return -1;
                }
@@ -116,7 +116,7 @@ UIConfiguration::load_state ()
                        return -1;
                }
 
-               if (set_state (*tree.root())) {
+               if (set_state (*tree.root(), Stateful::loading_state_version)) {
                        error << string_compose(_("Ardour: default ui configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
                        return -1;
                }
@@ -139,7 +139,7 @@ UIConfiguration::load_state ()
                        return -1;
                }
 
-               if (set_state (*tree.root())) {
+               if (set_state (*tree.root(), Stateful::loading_state_version)) {
                        error << string_compose(_("Ardour: user ui configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
                        return -1;
                }
index 857df3f7e3b70b799f19ec6bcb33d6795eb0bd07..09e844883161653f5ecd7c942d86256b41a49e51 100644 (file)
@@ -80,7 +80,7 @@ class UIConfiguration : public PBD::Stateful
        int save_state ();
        int load_defaults ();
 
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        XMLNode& get_state (void);
        XMLNode& get_variables (std::string);
        void set_variables (const XMLNode&);
index bf3e7cee6854b075988e323ee223bbc2b9b38c54..2100d736a89a8a1567700982bb64e8d822ba1f06 100644 (file)
@@ -339,7 +339,7 @@ Amp::set_state (const XMLNode& node, int version)
 {
        const XMLProperty* prop;
 
-       Processor::set_state (node);
+       Processor::set_state (node, version);
        prop = node.property ("gain");
 
        if (prop) {
index 3cd1bf13ddc57aae1f81437edf0fe9eb75631e16..724b1095a105439eb234746f643b9f410eece813 100644 (file)
@@ -55,7 +55,7 @@ public:
        void apply_gain_automation(bool yn) { _apply_gain_automation = yn; }
 
        XMLNode& state (bool full);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        static void apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t target);
        static void apply_simple_gain(BufferSet& bufs, nframes_t nframes, gain_t target);
index 507b148d8253d69b7263df98c966918d194144e9..ae2176cbab700e3c72e233a06009160f4b7b62da 100644 (file)
@@ -126,7 +126,7 @@ class AudioDiskstream : public Diskstream
        /* stateful */
 
        XMLNode& get_state(void);
-       int      set_state(const XMLNode& node, int version = 3000);
+       int      set_state(const XMLNode& node, int version);
 
        void monitor_input (bool);
 
index 585d1a1e725d7aff096d9c433ae6cb177cfcb13d..fc5b4255b3cf50f2f4e6737f2a2cc8654211a963 100644 (file)
@@ -55,7 +55,7 @@ class AudioTrack : public Track
        boost::shared_ptr<Region> bounce (InterThreadInfo&);
        boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
 
-       int set_state(const XMLNode&, int version = 3000);
+       int set_state(const XMLNode&, int version);
 
   protected:
        XMLNode& state (bool full);
index 6b93ced9057f7c0bdf6d4f4c672c5f356ad9455c..95c7db438528a303b5ee86bffab33e9583cdd4df 100644 (file)
@@ -72,7 +72,7 @@ public:
        int setup_peakfile ();
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        bool can_truncate_peaks() const { return !destructive(); }
        bool can_be_analysed() const    { return _length > 0; }
index 25595def8c466ef5415b11405dadbf04b0c0bfff..277fe5a8e194b33d0b943f61f2e1873e7a2f3a62 100644 (file)
@@ -50,7 +50,7 @@ class AudioPlaylist : public ARDOUR::Playlist
 
         nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n=0);
 
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        sigc::signal<void,boost::shared_ptr<Crossfade> > NewCrossfade;
 
index 5e9031c8971f2d8bd71633ec9b48f4462ebfd442..a8055575f9cc1550a0ec71e11d30cc28361978c3 100644 (file)
@@ -107,7 +107,7 @@ class AudioRegion : public Region
        virtual nframes_t read_raw_internal (Sample*, sframes_t, nframes_t, int channel) const;
 
        XMLNode& state (bool);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
 
        static void set_default_fade (float steepness, nframes_t len);
        bool fade_in_is_default () const;
@@ -219,7 +219,7 @@ class AudioRegion : public Region
 
        AudioRegion (Session& s, nframes_t, nframes_t, std::string name);
 
-       int set_live_state (const XMLNode&, Change&, bool send);
+       int set_live_state (const XMLNode&, int version, Change&, bool send);
 };
 
 } /* namespace ARDOUR */
index eebd1dd5d9d437055b1f7477a7916a9157309184..dd6076630db36050f024dbc1e1f3d094ac4158f1 100644 (file)
@@ -79,7 +79,7 @@ class AudioSource : virtual public Source,
        mutable sigc::signal<void,nframes_t,nframes_t>  PeakRangeReady;
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        int rename_peakfile (Glib::ustring newpath);
        void touch_peakfile ();
index 5f074385a30ae4497126a7e3c061911347a3e17e..69c8e38c9510771bdc4d0dc318c53129c5fc3e26 100644 (file)
@@ -80,7 +80,7 @@ class AutomationList : public PBD::StatefulDestructible, public Evoral::ControlL
        bool touching() const { return _touching; }
 
        XMLNode& get_state (); 
-       int set_state (const XMLNode &, int version = 3000);
+       int set_state (const XMLNode &, int version);
        XMLNode& state (bool full);
        XMLNode& serialize_events ();
 
index d1f059dc6263b35b5f25edbc460183972dd9658c..d2b1796b1807bda11453ab8c30898dad205580a9 100644 (file)
@@ -70,7 +70,7 @@ struct ControlProtocolInfo {
 
        void set_protocol_states (const XMLNode&);
 
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        XMLNode& get_state (void);
 
   private:
index 8a7773c0350371579cff1bc6871ca8dccf18701a..5d8e0235fb96ed604f6a9e7d9873a344437587b1 100644 (file)
@@ -75,7 +75,7 @@ class Crossfade : public ARDOUR::AudioRegion
        bool operator== (const ARDOUR::Crossfade&);
 
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        boost::shared_ptr<ARDOUR::AudioRegion> in() const { return _in; }
        boost::shared_ptr<ARDOUR::AudioRegion> out() const { return _out; }
index ef78c9bd45c9d8c0c9319609c7e3d34757ac899d..beccab73ae939ee724e63ff40666267839499cfe 100644 (file)
@@ -89,7 +89,7 @@ public:
        static sigc::signal<void,nframes_t> CycleStart;
 
        XMLNode& state (bool full);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        /* Panning */
 
index 5427dc644dc4c2cf8d0bd5a89dd0d54f9a17dd40..23ba6a713e68f6028c7effa7e42456fb8f5be263 100644 (file)
@@ -130,7 +130,7 @@ class Diskstream : public SessionObject, public boost::noncopyable
 
        /* Stateful */
        virtual XMLNode& get_state(void) = 0;
-       virtual int      set_state(const XMLNode&, int version = 3000) = 0;
+       virtual int      set_state(const XMLNode&, int version) = 0;
        
        virtual void monitor_input (bool) {}
 
index 5a9c2a9c56ff4529b3afd82d85f638b209a89bdc..ce34f1c0d4856903fdcd63387438262b6e663773 100644 (file)
@@ -46,7 +46,7 @@ public:
        bool                 is_embedded () const { return _is_embedded; }
        uint16_t             channel()      const { return _channel; }
 
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        int set_source_name (const Glib::ustring& newname, bool destructive);
 
index e896200c938d0fa38ce7f15485f9a462d73c614b..dfd37a4de5bccb1f12d5006b857017700332aef5 100644 (file)
@@ -38,7 +38,7 @@ class InternalReturn : public Return
 
        XMLNode& state(bool full);
        XMLNode& get_state(void);
-       int set_state(const XMLNode&, int version = 3000);
+       int set_state(const XMLNode&, int version);
 
        void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
        bool configure_io (ChanCount in, ChanCount out);
index d62be9eafa25f005b2f82cd8da6f01fd4d99b9ca..3b069af194c79fb268d0ef4eaea88b401fbab2a3 100644 (file)
@@ -38,7 +38,7 @@ class InternalSend : public Send
 
        XMLNode& state(bool full);
        XMLNode& get_state(void);
-       int set_state(const XMLNode& node, int version = 3000);
+       int set_state(const XMLNode& node, int version);
        
        void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
        bool feeds (boost::shared_ptr<Route> other) const;
index 9a13ced942471f5e9aaf1bda7bde63c604e64dda..5d64fae5808d86db104df929689a15fe5e0cbcff 100644 (file)
@@ -137,7 +137,7 @@ class IO : public SessionObject, public Latent
 
        virtual XMLNode& state (bool full);
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        int set_state_2X (const XMLNode&, int, bool);
 
        static int  disable_connecting (void);
index fdb0429bca1e1258cc36e83a7ee46a54ffacb54a..0d564bb00c1a9dbf278466f82acd77943ea04407 100644 (file)
@@ -72,7 +72,7 @@ class IOProcessor : public Processor
        sigc::signal<void,IOProcessor*,uint32_t> AutomationChanged;
 
        XMLNode& state (bool full_state);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        
   protected:
        boost::shared_ptr<IO> _input;
index b08f3e5afadba4a9aa5211d58b753720d8586bc9..656c13afae1bd355c150ee09ef4815046bb7a352 100644 (file)
@@ -99,7 +99,7 @@ class LadspaPlugin : public ARDOUR::Plugin
        bool parameter_is_toggled(uint32_t) const;
 
        XMLNode& get_state();
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
        bool     save_preset(std::string name);
 
        bool has_editor() const { return false; }
@@ -133,7 +133,7 @@ class LadspaPlugin : public ARDOUR::Plugin
        void init (void *mod, uint32_t index, nframes_t rate);
        void run_in_place (nframes_t nsamples);
        void latency_compute_run ();
-       int set_state_2X (const XMLNode&, int version = 3000);
+       int set_state_2X (const XMLNode&, int version);
 };
 
 class LadspaPluginInfo : public PluginInfo {
index cbc0782a4ae9cea2935770bff9446e371058fe9a..b48db52d92a613922a414b39d65b50bf2362bdca 100644 (file)
@@ -71,7 +71,7 @@ class Location : public PBD::StatefulDestructible
        }
 
        Location (const Location& other);
-       Location (const XMLNode&, int version = 3000);
+       Location (const XMLNode&);
        Location* operator= (const Location& other);
 
        bool locked() const { return _locked; }
@@ -125,7 +125,7 @@ class Location : public PBD::StatefulDestructible
        XMLNode& cd_info_node (const std::string &, const std::string &);
 
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
   private:
        std::string   _name;
@@ -155,7 +155,7 @@ class Locations : public PBD::StatefulDestructible
        void clear_ranges ();
 
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
         Location *get_location_by_id(PBD::ID);
 
        Location* auto_loop_location () const;
index de42512cfe0395ea12fc2e8fce681836aad7de2b..f2773a3d6c0f7372d3b3777a6ec909906c4a3a28 100644 (file)
@@ -115,7 +115,7 @@ class LV2Plugin : public ARDOUR::Plugin
        static uint32_t midi_event_type() { return _midi_event_type; }
 
        XMLNode& get_state();
-       int      set_state(const XMLNode& node);
+       int      set_state(const XMLNode& node, int version);
        bool     save_preset(std::string uri);
        bool     load_preset(const std::string uri);
        virtual std::vector<Plugin::PresetRecord> get_presets();
index aab752d591db7355a0f985d1fa4765d4cb1a3bb1..e152989229e75007f7bad7a6f8aab6b3ecd1b8ca 100644 (file)
@@ -75,7 +75,7 @@ class MidiDiskstream : public Diskstream
 
        /* stateful */
        XMLNode& get_state(void);
-       int set_state(const XMLNode&, int version = 3000);
+       int set_state(const XMLNode&, int version);
 
        void monitor_input (bool);
 
index a5b0e36b261fae08f0423b4a780935f0a394608e..6c7e26119ac21c66817c782ef7df9d2d32138acd 100644 (file)
@@ -70,7 +70,7 @@ public:
                void operator()();
                void undo();
                
-               int set_state (const XMLNode&, int version = 3000);
+               int set_state (const XMLNode&, int version);
                XMLNode& get_state ();
 
                void add(const boost::shared_ptr< Evoral::Note<TimeType> > note);
@@ -114,7 +114,7 @@ public:
                void operator()();
                void undo();
                
-               int set_state (const XMLNode&, int version = 3000);
+               int set_state (const XMLNode&, int version);
                XMLNode& get_state ();
 
                void change (const boost::shared_ptr<Evoral::Note<TimeType> > note,
index dc315edb12f08606362140dae6e4661c9e00810c..c83bf80a2826d5c9c79c98cae92a2a8487c94e2e 100644 (file)
@@ -50,7 +50,7 @@ public:
        nframes_t read (MidiRingBuffer<nframes_t>& buf,
                        nframes_t start, nframes_t cnt, uint32_t chan_n=0);
 
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        bool destroy_region (boost::shared_ptr<Region>);
 
index ddb3109ff66af45acca915c4701e3b2a647aabea..c796ee742b209ab88b082e7e68577257994c2821 100644 (file)
@@ -68,7 +68,7 @@ class MidiRegion : public Region
                        NoteMode  mode = Sustained) const;
 
        XMLNode& state (bool);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
 
        int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr<Region> >&) const;
 
@@ -118,7 +118,7 @@ class MidiRegion : public Region
 
   protected:
 
-       int set_live_state (const XMLNode&, Change&, bool send);
+       int set_live_state (const XMLNode&, int version, Change&, bool send);
 };
 
 } /* namespace ARDOUR */
index 8a09aad6c8ec007e10423ada379f24085b49a19c..bffcde51925112244c5c5e843daf9e81d6a3f72f 100644 (file)
@@ -91,7 +91,7 @@ class MidiSource : virtual public Source
        mutable sigc::signal<void,sframes_t,nframes_t> ViewDataRangeReady;
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        bool length_mutable() const { return true; }
 
index 9f19c6590ce3bb36a31b4166324bd03ec4077f70..c273395a74be2b135a800beb72fd98f038769934 100644 (file)
@@ -59,7 +59,7 @@ public:
        boost::shared_ptr<Region>  bounce_range (
                        nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
 
-       int set_state(const XMLNode&, int version = 3000);
+       int set_state(const XMLNode&, int version);
 
        void midi_panic(void);
        bool write_immediate_event(size_t size, const uint8_t* buf);
index 39ad9ffd615f1eb19dbdf7fe990ca03296cc007d..70015f3a35877bef2e78c6e240540aa252ae70b6 100644 (file)
@@ -65,7 +65,7 @@ class MuteMaster : public AutomationControl
        sigc::signal<void> MutePointChanged;
 
        XMLNode& get_state();
-       int set_state(const XMLNode&, int version = 3000);
+       int set_state(const XMLNode&, int version);
 
   private:
        AutomationList* _automation;
index 4911dd8c50139b16b657b8eb6dca54bea58c69b3..d41f104e1a1518e0684621fd42e92772b33c1c9f 100644 (file)
@@ -44,7 +44,7 @@ struct NamedSelection : public PBD::Stateful
 
     XMLNode& get_state (void);
 
-    int set_state (const XMLNode&, int version = 3000);
+    int set_state (const XMLNode&, int version);
 
     static sigc::signal<void,NamedSelection*> NamedSelectionCreated;
 };
index 6a435ec235f6ddbd74c405c474bcf6762eff04f0..86cd4861136b3c7d6aa8ec1a0c25463f9e5ac18c 100644 (file)
@@ -73,7 +73,7 @@ class StreamPanner : public sigc::trackable, public PBD::Stateful
        sigc::signal<void> Changed;      /* for position */
        sigc::signal<void> StateChanged; /* for mute */
 
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        virtual XMLNode& state (bool full_state) = 0;
 
        Panner & get_parent() { return parent; }
@@ -150,7 +150,7 @@ class EqualPowerStereoPanner : public BaseStereoPanner
 
        XMLNode& state (bool full_state); 
        XMLNode& get_state (void); 
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
 
   private:
        void update ();
@@ -171,7 +171,7 @@ class Multi2dPanner : public StreamPanner
 
        XMLNode& state (bool full_state);
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        /* old school automation loading */
 
@@ -228,7 +228,7 @@ public:
 
        XMLNode& get_state (void);
        XMLNode& state (bool full);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
 
        static bool equivalent (pan_t a, pan_t b) {
                return fabsf (a - b) < 0.002; // about 1 degree of arc for a stereo panner
index 01bb12db8d810bcfdd75e02ed1e1b14492a02d5c..aa661b8588401a43604d5c236fd1a03458b3b7bb 100644 (file)
@@ -124,7 +124,7 @@ class Playlist : public SessionObject,
        void foreach_region (sigc::slot<void, boost::shared_ptr<Region> >);
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        XMLNode& get_template ();
 
        sigc::signal<void,bool> InUse;
index 82111a5a4df180e661989d9e2e116b27793f87d4..ea8228f5fcfb50d301ddf486ebbe77446731bb2b 100644 (file)
@@ -45,14 +45,14 @@ class PluginInsert : public Processor
 {
   public:
        PluginInsert (Session&, boost::shared_ptr<Plugin>);
-       PluginInsert (Session&, const XMLNode&, int version = 3000);
+       PluginInsert (Session&, const XMLNode&);
        ~PluginInsert ();
 
        static const std::string port_automation_node_name;
 
        XMLNode& state(bool);
        XMLNode& get_state(void);
-       int set_state(const XMLNode&, int version = 3000);
+       int set_state(const XMLNode&, int version);
 
        void run (BufferSet& in, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
        void silence (nframes_t nframes);
index 73dacf7d6887481dfc5fd167f603b98186b26a24..3283415e6d67188d813d1e5dc33089578934bcee 100644 (file)
@@ -44,12 +44,12 @@ class PortInsert : public IOProcessor
 {
   public:
        PortInsert (Session&, boost::shared_ptr<MuteMaster> mm);
-       PortInsert (Session&, boost::shared_ptr<MuteMaster> mm, const XMLNode&, int version = 3000);
+       PortInsert (Session&, boost::shared_ptr<MuteMaster> mm, const XMLNode&);
        ~PortInsert ();
 
        XMLNode& state(bool full);
        XMLNode& get_state(void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
 
index 1e78777eddfb2dbc3d6fa07574b5cdc937ca4f9a..473bb97130fe7332d3ccb86aa143d8f98748b125 100644 (file)
@@ -91,7 +91,7 @@ class Processor : public SessionObject, public AutomatableControls, public Laten
 
        virtual XMLNode& state (bool full);
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        
        void *get_gui () const { return _gui; }
        void  set_gui (void *p) { _gui = p; }
index d0dc042bb16a7b0b1962dad9ac8b10a7cc812d92..555c925a011386c91882273f055cce6915887601 100644 (file)
@@ -37,7 +37,7 @@ class RCConfiguration : public Configuration
        RCConfiguration();
 
        void map_parameters (sigc::slot<void, std::string>);
-       int set_state (XMLNode const &, int version = 3000);
+       int set_state (XMLNode const &, int version);
        XMLNode& get_state ();
        XMLNode& get_variables ();
        void set_variables (XMLNode const &);
index d3414892495dac084f30498b3590b02642d24849..0f1f10eff832b38e35bf43cbf59d957702acc7e3 100644 (file)
@@ -241,8 +241,8 @@ class Region
 
        XMLNode&         get_state ();
        virtual XMLNode& state (bool);
-       virtual int      set_state (const XMLNode&, int version = 3000);
-       virtual int      set_live_state (const XMLNode&, Change&, bool send);
+       virtual int      set_state (const XMLNode&, int version);
+       virtual int      set_live_state (const XMLNode&, int version, Change&, bool send);
 
        virtual boost::shared_ptr<Region> get_parent() const;
 
index 3232e932955370d4ed6f7fcb955cb2105700dc78..b3212fe4a05c56f397ccc70a852593a1d767ac5c 100644 (file)
@@ -54,7 +54,7 @@ public:
 
        XMLNode& state(bool full);
        XMLNode& get_state(void);
-       int      set_state(const XMLNode&, int version = 3000);
+       int      set_state(const XMLNode&, int version);
 
        uint32_t pans_required() const { return _configured_input.n_audio(); }
 
index ac3c6f89f3fff4a410034ff8e25927b64acfe13a..51e4d993350f97e11097e800cbf50d333ae99a47 100644 (file)
@@ -66,9 +66,8 @@ class Route : public SessionObject, public AutomatableControls
                ControlOut = 0x4
        };
 
-       Route (Session&, std::string name, Flag flags = Flag(0),
-              DataType default_type = DataType::AUDIO);
-       Route (Session&, const XMLNode&, int, DataType default_type = DataType::AUDIO);
+       Route (Session&, std::string name, Flag flags = Flag(0), DataType default_type = DataType::AUDIO);
+       Route (Session&, const XMLNode&, DataType default_type = DataType::AUDIO);
        virtual ~Route();
 
        boost::shared_ptr<IO> input() const { return _input; }
@@ -251,7 +250,7 @@ class Route : public SessionObject, public AutomatableControls
        /* stateful */
 
        XMLNode& get_state();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        virtual XMLNode& get_template();
 
        XMLNode& get_processor_state ();
index 124f3c9b3f04806ff5bcc3ad355a94ed7ff69f24..0f7109337798932d43c4ea1975e5b94cf616f2f1 100644 (file)
@@ -131,7 +131,7 @@ public:
 
        XMLNode& get_state ();
        
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        
 private:
        Session& _session;
index 13b7adbbf2ba8fe35673e9f135fda2fb2eb8858f..f9f13ee309f00da5a80355564b1969bbbcd70079 100644 (file)
@@ -53,7 +53,7 @@ class Send : public Delivery
 
        XMLNode& state(bool full);
        XMLNode& get_state(void);
-       int set_state(const XMLNode&, int version = 3000);
+       int set_state(const XMLNode&, int version);
 
        uint32_t pans_required() const { return _configured_input.n_audio(); }
 
index c5b793730c6e8777dc7aaaaada38677212f075e0..cc94d3878c035c81e983a0a2238d3e9ce655e9d2 100644 (file)
@@ -468,7 +468,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        static std::vector<std::string*>* possible_states (std::string path);
 
        XMLNode& get_state();
-       int      set_state(const XMLNode& node, int version = 3000); // not idempotent
+       int      set_state(const XMLNode& node, int version); // not idempotent
        XMLNode& get_template();
 
        /// The instant xml file is written to the session directory
@@ -849,7 +849,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        public:
                GlobalRouteStateCommand (Session&, void*);
                GlobalRouteStateCommand (Session&, const XMLNode& node);
-               int set_state (const XMLNode&, int version = 3000);
+               int set_state (const XMLNode&, int version);
                XMLNode& get_state ();
 
        protected:
@@ -899,7 +899,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
                void operator()();
                void undo();
                XMLNode &get_state();
-               int set_state (const XMLNode&, int version = 3000);
+               int set_state (const XMLNode&, int version);
                void mark();
 
        protected:
@@ -1170,8 +1170,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        std::string _current_snapshot_name;
 
-       XMLTree* state_tree;
-       bool     state_was_pending;
+       XMLTree*         state_tree;
+       bool             state_was_pending;
        StateOfTheState _state_of_the_state;
 
        void     auto_save();
index 20e14f37d55c5907d898e884db90e70721ec12a4..20df86ca4dc75f04bef746bd8a949d131378c809 100644 (file)
@@ -30,7 +30,7 @@ public:
        SessionConfiguration ();
 
        void map_parameters (sigc::slot<void, std::string>);
-       int set_state (XMLNode const &, int version = 3000);
+       int set_state (XMLNode const &, int version);
        XMLNode& get_state ();
        XMLNode& get_variables ();
        void set_variables (XMLNode const &);
index 7813788e55f251869d170485ecefda8cfdd01325..481e21c338e8aea62e49901b5e3f9cabdb05aec8 100644 (file)
@@ -107,7 +107,7 @@ class SessionMetadata : public PBD::StatefulDestructible
 
        /*** Serialization ***/
        XMLNode & get_state ();
-       int set_state (const XMLNode &, int version = 3000);
+       int set_state (const XMLNode &, int version);
 
   private:
 
index 3c6364532a6f368343b400ca69aeb18f667aea06..fbaa049d8ab54456be855b4c8b3bb11a7d08bef9 100644 (file)
@@ -58,7 +58,7 @@ public:
        void mark_streaming_write_completed ();
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        void load_model (bool lock=true, bool force_reload=false);
        void destroy_model ();
index c34c5a91582ac161ba6d8be6b7c386d1359f681f..1ffca509fd972ca52b060d3fa3760c52560ac04f 100644 (file)
@@ -76,7 +76,7 @@ class Source : public SessionObject, public boost::noncopyable
        virtual void session_saved() {}
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        
        bool         destructive() const       { return (_flags & Destructive); }
        bool         writable () const         { return (_flags & Writable); }
index 742919c77af98f5134f23f765e90d875fb9703fd..658330cf827196d5172c06b8becc0f5a7a45374a 100644 (file)
@@ -212,7 +212,7 @@ class TempoMap : public PBD::StatefulDestructible
        void set_length (nframes_t frames);
 
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        void dump (std::ostream&) const;
        void clear ();
index 74cbe399df4729710d948de03e44d9fb9d8c2d26..02cab70a84f49c0943157a695bdc987b9f517cc5 100644 (file)
@@ -82,7 +82,7 @@ class Track : public Route
 
        XMLNode&    get_state();
        XMLNode&    get_template();
-       virtual int set_state (const XMLNode&, int version = 3000) = 0;
+       virtual int set_state (const XMLNode&, int version) = 0;
        static void zero_diskstream_id_in_xml (XMLNode&);
 
        boost::shared_ptr<PBD::Controllable> rec_enable_control() { return _rec_enable_control; }
@@ -96,7 +96,7 @@ class Track : public Route
        sigc::signal<void> FreezeChange;
 
   protected:
-       Track (Session& sess, const XMLNode& node, int, DataType default_type = DataType::AUDIO);
+       Track (Session& sess, const XMLNode& node, DataType default_type = DataType::AUDIO);
 
        virtual XMLNode& state (bool full) = 0;
 
index f590ec1ebef4182d27896f7ea115daa72b35849a..c124e2e722a1869d0039b4c4361eed8b402fff5f 100644 (file)
@@ -38,7 +38,7 @@ class UserBundle : public Bundle, public PBD::Stateful {
        XMLNode& get_state ();
 
   private:
-       int set_state (XMLNode const &, int version = 3000);
+       int set_state (XMLNode const &, int version);
 };
 
 }
index bb0b715f3b5a79321c8c065083c319e522af307e..e43cbd78917987a54530d0a0e7737acd30b299d8 100644 (file)
@@ -90,7 +90,7 @@ AudioDiskstream::AudioDiskstream (Session& sess, const XMLNode& node)
        in_set_state = true;
        init (Recordable);
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                in_set_state = false;
                throw failed_constructor();
        }
index 812aa8783ba301f22989ae9da79d7d29da3af484..eb4913e72778ab2f4e05991d93b0bc7b3ebf6642 100644 (file)
@@ -46,7 +46,7 @@ AudioPlaylist::AudioPlaylist (Session& session, const XMLNode& node, bool hidden
        assert(!prop || DataType(prop->value()) == DataType::AUDIO);
 
        in_set_state++;
-       set_state (node);
+       set_state (node, Stateful::loading_state_version);
        in_set_state--;
 }
 
@@ -566,7 +566,7 @@ AudioPlaylist::set_state (const XMLNode& node, int version)
 
        in_set_state++;
 
-       Playlist::set_state (node);
+       Playlist::set_state (node, version);
 
        freeze ();
 
index 600cad6aa2898d4fd982c658f4ffb1e6641fe770..c1862fb5b0a0e21fb3ce480a84fe76d98f05d9fa 100644 (file)
@@ -57,9 +57,9 @@ AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode
 }
 
 AudioTrack::AudioTrack (Session& sess, const XMLNode& node, int version)
-       : Track (sess, node, version)
+       : Track (sess, node)
 {
-       _set_state (node, version, false);
+       _set_state (node, Stateful::loading_state_version, false);
 }
 
 AudioTrack::~AudioTrack ()
@@ -300,7 +300,7 @@ AudioTrack::_set_state (const XMLNode& node, int version, bool call_base)
                child = *niter;
 
                if (child->name() == X_("recenable")) {
-                       _rec_enable_control->set_state (*child);
+                       _rec_enable_control->set_state (*child, version);
                        _session.add_controllable (_rec_enable_control);
                }
        }
@@ -809,7 +809,7 @@ AudioTrack::unfreeze ()
                        for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
                                for (vector<FreezeRecordProcessorInfo*>::iterator ii = _freeze_record.processor_info.begin(); ii != _freeze_record.processor_info.end(); ++ii) {
                                        if ((*ii)->id == (*i)->id()) {
-                                               (*i)->set_state (((*ii)->state));
+                                               (*i)->set_state (((*ii)->state), Stateful::current_state_version);
                                                break;
                                        }
                                }
index 5430d300fbfd281e989137359ecc03a68568e8e1..8de786eb0e0901f94c64cf3d516a328651e0772d 100644 (file)
@@ -121,7 +121,7 @@ AudioFileSource::AudioFileSource (Session& s, const XMLNode& node, bool must_exi
        , AudioSource (s, node)
        , FileSource (s, node, must_exist)
 {
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor ();
        }
 
@@ -260,15 +260,15 @@ AudioFileSource::get_state ()
 int
 AudioFileSource::set_state (const XMLNode& node, int version)
 {
-       if (Source::set_state (node)) {
+       if (Source::set_state (node, version)) {
                return -1;
        }
 
-       if (AudioSource::set_state (node)) {
+       if (AudioSource::set_state (node, version)) {
                return -1;
        }
 
-       if (FileSource::set_state (node)) {
+       if (FileSource::set_state (node, version)) {
                return -1;
        }
 
index 47dfc6c902ecc2afb797816f470c7e40dc38bb44..a5c52ce671315c6c877c35f16099d6a7f9ce27c7 100644 (file)
@@ -236,7 +236,7 @@ AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, const XMLNode& nod
 
        init ();
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 
@@ -255,7 +255,7 @@ AudioRegion::AudioRegion (SourceList& srcs, const XMLNode& node)
 {
        init ();
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 
@@ -634,13 +634,13 @@ AudioRegion::state (bool full)
 }
 
 int
-AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool send)
+AudioRegion::set_live_state (const XMLNode& node, int version, Change& what_changed, bool send)
 {
        const XMLNodeList& nlist = node.children();
        const XMLProperty *prop;
        LocaleGuard lg (X_("POSIX"));
 
-       Region::set_live_state (node, what_changed, false);
+       Region::set_live_state (node, version, what_changed, false);
 
        uint32_t old_flags = _flags;
 
@@ -691,7 +691,7 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
 
                        _envelope->clear ();
 
-                       if ((prop = child->property ("default")) != 0 || _envelope->set_state (*child)) {
+                       if ((prop = child->property ("default")) != 0 || _envelope->set_state (*child, version)) {
                                set_default_envelope ();
                        }
 
@@ -707,7 +707,7 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
                        } else {
                                XMLNode* grandchild = child->child ("AutomationList");
                                if (grandchild) {
-                                       _fade_in->set_state (*grandchild);
+                                       _fade_in->set_state (*grandchild, version);
                                }
                        }
 
@@ -728,7 +728,7 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
                        } else {
                                XMLNode* grandchild = child->child ("AutomationList");
                                if (grandchild) {
-                                       _fade_out->set_state (*grandchild);
+                                       _fade_out->set_state (*grandchild, version);
                                }
                        }
 
@@ -758,7 +758,7 @@ AudioRegion::set_state (const XMLNode& node, int version)
           to handle the relevant stuff.
        */
 
-       return Region::set_state (node);
+       return Region::set_state (node, version);
 }
 
 void
index d50ad0c6b7794148eba53d68aa63e3f6f4d218e8..93e201b8c2843171a86208fd77338b0d0de793a1 100644 (file)
@@ -85,7 +85,7 @@ AudioSource::AudioSource (Session& s, const XMLNode& node)
        peak_leftover_size = 0;
        peak_leftovers = 0;
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 }
index be3c38f29b232b5bedc792d613e7db798e5f5566..c0a652275c17bc7bec505aa6e54bf9525e1a36cb 100644 (file)
@@ -100,7 +100,7 @@ AutomationList::AutomationList (const XMLNode& node, Evoral::Parameter id)
        _state = Off;
        _style = Absolute;
 
-       set_state (node);
+       set_state (node, Stateful::loading_state_version);
 
        if (id) {
                _parameter = id;
@@ -368,7 +368,7 @@ AutomationList::set_state (const XMLNode& node, int version)
 
                if ((nsos = node.child (X_("AutomationList")))) {
                        /* new school in old school clothing */
-                       return set_state (*nsos);
+                       return set_state (*nsos, version);
                }
 
                /* old school */
index 8546a41e6652cfda426bd1a10c24dcd32f3bcbaa..0e687988d2d480b37827dcddfd67fcf5fbf8825b 100644 (file)
@@ -74,7 +74,7 @@ ControlProtocolManager::set_session (Session& s)
                        (*i)->requested = false;
 
                        if ((*i)->protocol && (*i)->state) {
-                               (*i)->protocol->set_state (*(*i)->state);
+                               (*i)->protocol->set_state (*(*i)->state, Stateful::loading_state_version);
                        }
                }
        }
index 65ad1e25fbbe4d008aaf8f893737bf98f535aa21..c69eeea21da2aecb0c54dc4d5b3f761c834c5bd4 100644 (file)
@@ -157,7 +157,7 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
        initialize();
        _active = true;
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 }
index 5f264c5b7ee1d3bd8fd70cab6c243e2ee90f43c1..5b063ad566c22aadc0d2972d2e105e74a9fcf894 100644 (file)
@@ -109,7 +109,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode&
 {
        _panner = boost::shared_ptr<Panner>(new Panner (_name, _session));
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor ();
        }
 
@@ -136,7 +136,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr<IO> out, boost::shared_ptr<Mut
 {
        _panner = boost::shared_ptr<Panner>(new Panner (_name, _session));
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor ();
        }
 
@@ -376,7 +376,7 @@ Delivery::set_state (const XMLNode& node, int version)
 {
        const XMLProperty* prop;
 
-       if (IOProcessor::set_state (node)) {
+       if (IOProcessor::set_state (node, version)) {
                return -1;
        }
 
@@ -390,7 +390,7 @@ Delivery::set_state (const XMLNode& node, int version)
        XMLNode* pan_node = node.child (X_("Panner"));
 
        if (pan_node) {
-               _panner->set_state (*pan_node);
+               _panner->set_state (*pan_node, version);
        }
 
        reset_panner ();
index acd7da1bc54f4e351e43b218007878001f28b7ec..d893c1e54bb7cbc52d6178727790fff4b77c1b7d 100644 (file)
@@ -298,6 +298,12 @@ ARDOUR::init (bool use_vst, bool try_optimization)
 
        (void) bindtextdomain(PACKAGE, LOCALEDIR);
 
+       /* provide a state version for the few cases that need it and are not
+          driven by reading state from disk (e.g. undo/redo)
+       */
+
+       Stateful::current_state_version = CURRENT_SESSION_FILE_VERSION;
+
        setup_enum_writer ();
 
        // allow ardour the absolute maximum number of open files
@@ -360,7 +366,7 @@ ARDOUR::init_post_engine ()
 
        XMLNode* node;
        if ((node = Config->control_protocol_state()) != 0) {
-               ControlProtocolManager::instance().set_state (*node);
+               ControlProtocolManager::instance().set_state (*node, Stateful::loading_state_version);
        }
 }
 
index 9f828ab47ba1813ba5b369e2a421f74a94a7c810..8a3baf5bda1fd274ac7e1384030f11fddd257046 100644 (file)
@@ -133,7 +133,7 @@ InternalReturn::get_state()
 int
 InternalReturn::set_state (const XMLNode& node, int version)
 {
-       return Return::set_state (node);
+       return Return::set_state (node, version);
 }
 
 bool
index abc6ced05cd2995c1d2249780f76296c0c1ff3bc..d70889a27c922445a5a65ecf83461d12cf183b74 100644 (file)
@@ -49,7 +49,7 @@ InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost:
 InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node)
        : Send (s, mm, node, Delivery::Aux /* will be reset in set_state() */)
 {
-       set_state (node);
+       set_state (node, Stateful::loading_state_version);
 }
 
 InternalSend::~InternalSend ()
@@ -175,7 +175,7 @@ InternalSend::set_state (const XMLNode& node, int version)
 {
        const XMLProperty* prop;
 
-       Send::set_state (node);
+       Send::set_state (node, version);
 
        if ((prop = node.property ("target")) != 0) {
 
index f49692a910b9fd4e1449d87fdd1841d8db5d3482..5bb51bfa18f159b3aef00fb79930b34d1c70b2a6 100644 (file)
@@ -93,7 +93,7 @@ IO::IO (Session& s, const XMLNode& node, DataType dt)
        _active = true;
        pending_state_node = 0;
 
-       set_state (node);
+       set_state (node, Stateful::loading_state_version);
        setup_bundles ();
 }
 
index 2f42c724bf2716d0f2089e7bb063ac7a632a6917..21a2b10313d4be15afcdf727b0f227669aa90508 100644 (file)
@@ -152,7 +152,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
        const XMLProperty *prop;
        const XMLNode *io_node = 0;
 
-       Processor::set_state(node);
+       Processor::set_state(node, version);
 
        if ((prop = node.property ("own-input")) != 0) {
                _own_input = string_is_affirmative (prop->value());
@@ -176,7 +176,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
                }
 
                if (io_node) {
-                       _input->set_state(*io_node);
+                       _input->set_state(*io_node, version);
 
                        // legacy sessions: use IO name
                        if ((prop = node.property ("name")) == 0) {
@@ -198,7 +198,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
                }
 
                if (io_node) {
-                       _output->set_state(*io_node);
+                       _output->set_state(*io_node, version);
 
                        // legacy sessions: use IO name
                        if ((prop = node.property ("name")) == 0) {
index 5fb0442eba118033fa729ebd30b53215a1220388..7b9e706c36bc9de7b07e93344dbb00f0141bd9a1 100644 (file)
@@ -59,9 +59,9 @@ Location::Location (const Location& other)
        _locked = false;
 }
 
-Location::Location (const XMLNode& node, int version)
+Location::Location (const XMLNode& node)
 {
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor ();
        }
 }
index 0fb766e7d4df7f0e91133cc69870caaa64056b25..38774104afa9bd90b042b32d6dbafad63b784ecf 100644 (file)
@@ -354,7 +354,7 @@ LV2Plugin::has_editor() const
 }
 
 int
-LV2Plugin::set_state(const XMLNode& node)
+LV2Plugin::set_state(const XMLNode& node, int version)
 {
        XMLNodeList nodes;
        XMLProperty *prop;
index 4cae90007456aedb6a72265f78f30e56526893fd..a1604858e4ccd5a7728e681325804301c5be8e64 100644 (file)
@@ -98,7 +98,7 @@ MidiDiskstream::MidiDiskstream (Session& sess, const XMLNode& node)
        in_set_state = true;
        init (Recordable);
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                in_set_state = false;
                throw failed_constructor();
        }
index df34d13a244d3de9c509e2f28c89389794bf35e3..eb69a2a906d032e3e67fe1f78eeff264b70679aa 100644 (file)
@@ -112,7 +112,7 @@ MidiModel::DeltaCommand::DeltaCommand(boost::shared_ptr<MidiModel> m, const XMLN
        : _model(m)
 {
        assert(_model);
-       set_state(node);
+       set_state(node, Stateful::loading_state_version);
 }
 
 void
@@ -321,7 +321,7 @@ MidiModel::DiffCommand::DiffCommand(boost::shared_ptr<MidiModel> m, const XMLNod
        : _model(m)
 {
        assert(_model);
-       set_state(node);
+       set_state(node, Stateful::loading_state_version);
 }
 
 void
index b0fd5de24eabddbcafefbe8fc73d5734465bade6..8d030b949e4c9be9d3aa6233460ae34ec4ecb827 100644 (file)
@@ -48,7 +48,7 @@ MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden)
        assert(prop && DataType(prop->value()) == DataType::MIDI);
 
        in_set_state++;
-       set_state (node);
+       set_state (node, Stateful::loading_state_version);
        in_set_state--;
 }
 
@@ -192,7 +192,7 @@ MidiPlaylist::set_state (const XMLNode& node, int version)
        in_set_state++;
        freeze ();
 
-       Playlist::set_state (node);
+       Playlist::set_state (node, version);
 
        thaw();
        in_set_state--;
index f22a1994bf65c70b2fcabc2f1b905d93c5ddec86..3ced46df9f69f37dfcaef7d788c0d76971e242c4 100644 (file)
@@ -91,7 +91,7 @@ MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other)
 MidiRegion::MidiRegion (boost::shared_ptr<MidiSource> src, const XMLNode& node)
        : Region (src, node)
 {
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 
@@ -103,7 +103,7 @@ MidiRegion::MidiRegion (boost::shared_ptr<MidiSource> src, const XMLNode& node)
 MidiRegion::MidiRegion (const SourceList& srcs, const XMLNode& node)
        : Region (srcs, node)
 {
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 
@@ -249,12 +249,12 @@ MidiRegion::state (bool full)
 }
 
 int
-MidiRegion::set_live_state (const XMLNode& node, Change& what_changed, bool send)
+MidiRegion::set_live_state (const XMLNode& node, int version, Change& what_changed, bool send)
 {
        const XMLProperty *prop;
        LocaleGuard lg (X_("POSIX"));
 
-       Region::set_live_state (node, what_changed, false);
+       Region::set_live_state (node, version, what_changed, false);
 
        uint32_t old_flags = _flags;
 
@@ -292,7 +292,7 @@ MidiRegion::set_state (const XMLNode& node, int version)
           to handle the relevant stuff.
        */
 
-       return Region::set_state (node);
+       return Region::set_state (node, version);
 }
 
 void
index e90e90aa320e4f10cbd738a46a45a8624d043a66..53b1d2c9a525a165482e1473de598f763cdc7a06 100644 (file)
@@ -72,7 +72,7 @@ MidiSource::MidiSource (Session& s, const XMLNode& node)
        _read_data_count = 0;
        _write_data_count = 0;
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 }
index 6f036f803c4076b8df4c5183c5000c4fe76dc6be..68ff7de1e2065b9c2f8b5069217f7becd03272bc 100644 (file)
@@ -67,7 +67,7 @@ MidiTrack::MidiTrack (Session& sess, string name, Route::Flag flag, TrackMode mo
 }
 
 MidiTrack::MidiTrack (Session& sess, const XMLNode& node, int version)
-       : Track (sess, node, version, DataType::MIDI)
+       : Track (sess, node, DataType::MIDI)
        , _immediate_events(1024) // FIXME: size?
        , _step_edit_ring_buffer(64) // FIXME: size?
        , _note_mode(Sustained)
@@ -75,7 +75,7 @@ MidiTrack::MidiTrack (Session& sess, const XMLNode& node, int version)
        , _default_channel (0)
        , _midi_thru (true)
 {
-       _set_state (node, version, false);
+       _set_state (node, Stateful::loading_state_version, false);
 }
 
 MidiTrack::~MidiTrack ()
@@ -232,7 +232,7 @@ MidiTrack::_set_state (const XMLNode& node, int version, bool call_base)
                child = *niter;
 
                if (child->name() == X_("recenable")) {
-                       _rec_enable_control->set_state (*child);
+                       _rec_enable_control->set_state (*child, version);
                        _session.add_controllable (_rec_enable_control);
                }
        }
index 993cbe39f84c39e9072a70744d58dae789f787d2..a867130b515f5a5d6ad512e1e6c400eb2121a97e 100644 (file)
@@ -496,18 +496,18 @@ EqualPowerStereoPanner::set_state (const XMLNode& node, int version)
                set_position (pos, true);
        }
 
-       StreamPanner::set_state (node);
+       StreamPanner::set_state (node, version);
 
        for (XMLNodeConstIterator iter = node.children().begin(); iter != node.children().end(); ++iter) {
 
                if ((*iter)->name() == X_("Controllable")) {
                        if ((prop = (*iter)->property("name")) != 0 && prop->value() == "panner") {
-                               _control->set_state (**iter);
+                               _control->set_state (**iter, version);
                        }
 
                } else if ((*iter)->name() == X_("Automation")) {
 
-                       _control->alist()->set_state (*((*iter)->children().front()));
+                       _control->alist()->set_state (*((*iter)->children().front()), version);
 
                        if (_control->alist()->automation_state() != Off) {
                                set_position (_control->list()->eval (parent.session().transport_frame()));
@@ -1154,7 +1154,7 @@ Panner::set_state (const XMLNode& node, int version)
                                                sp = pan_plugins[i].factory (*this, Evoral::Parameter(PanAutomation, 0, num_panners));
                                                num_panners++;
 
-                                               if (sp->set_state (**niter) == 0) {
+                                               if (sp->set_state (**niter, version) == 0) {
                                                        _streampanners.push_back (sp);
                                                }
 
index aebcb59f3d69135845976e111f34b54fe09f9a80..a072d4977b3f248e782d92a942efbc2d20a43201 100644 (file)
@@ -1845,7 +1845,7 @@ Playlist::set_state (const XMLNode& node, int version)
 
                                Change what_changed = Change (0);
 
-                               if (region->set_live_state (*child, what_changed, true)) {
+                               if (region->set_live_state (*child, version, what_changed, true)) {
                                        error << _("Playlist: cannot reset region state from XML") << endmsg;
                                        continue;
                                }
index 14ea464555740f2c5c92e5937345af86379bd9d0..2a5ef29a45d3b4c366282a002a523a13954b35d7 100644 (file)
@@ -81,12 +81,12 @@ PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug)
        ProcessorCreated (this); /* EMIT SIGNAL */
 }
 
-PluginInsert::PluginInsert (Session& s, const XMLNode& node, int version)
+PluginInsert::PluginInsert (Session& s, const XMLNode& node)
        : Processor (s, "unnamed plugin insert"),
           _signal_analysis_collected_nframes(0),
           _signal_analysis_collect_nframes_max(0)
 {
-       if (set_state (node, version)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 
@@ -836,7 +836,7 @@ PluginInsert::set_state(const XMLNode& node, int version)
                                        data().control(Evoral::Parameter(PluginAutomation, 0, port_id), true));
 
                        if (!child->children().empty()) {
-                               c->alist()->set_state (*child->children().front());
+                               c->alist()->set_state (*child->children().front(), version);
                        } else {
                                if ((cprop = child->property("auto")) != 0) {
 
index 04a145aa52af11fba94a047273e93d4ec68097ea..3b02bf41daa6672e1c9ef91720a03763efc8f491 100644 (file)
@@ -48,12 +48,12 @@ PortInsert::PortInsert (Session& s, boost::shared_ptr<MuteMaster> mm)
        ProcessorCreated (this); /* EMIT SIGNAL */
 }
 
-PortInsert::PortInsert (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node, int version)
+PortInsert::PortInsert (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node)
        : IOProcessor (s, true, true, "unnamed port insert")
        , _out (new Delivery (s, _output, mm, _name, Delivery::Insert))
 
 {
-       if (set_state (node, version)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 
@@ -138,7 +138,7 @@ PortInsert::set_state (const XMLNode& node, int version)
                }
        }
 
-       Processor::set_state (*insert_node);
+       Processor::set_state (*insert_node, version);
 
        return 0;
 }
index e1db982fe119a1771cf83b02824fe35667e01022..a52db49224163ab6eb08da969f1734a461387912 100644 (file)
@@ -82,7 +82,7 @@ Processor::Processor (Session& session, const XMLNode& node)
        , _configured(false)
        , _gui(0)
 {
-       set_state (node);
+       set_state (node, Stateful::loading_state_version);
        _pending_active = _active;
 }
 
index afa9a2a4c360f5101d03358a2799327853cd8c32..725225b8d0a462fb2af2bb056af1c444573d48bd 100644 (file)
@@ -97,7 +97,7 @@ RCConfiguration::load_state ()
                                return -1;
                        }
 
-                       if (set_state (*tree.root())) {
+                       if (set_state (*tree.root(), Stateful::current_state_version)) {
                                error << string_compose(_("Ardour: system configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
                                return -1;
                        }
@@ -132,7 +132,7 @@ RCConfiguration::load_state ()
                                return -1;
                        }
 
-                       if (set_state (*tree.root())) {
+                       if (set_state (*tree.root(), Stateful::current_state_version)) {
                                error << string_compose(_("Ardour: user configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
                                return -1;
                        }
index 244312bc0ab59659a576e6389c509f0bfc8ba74f..903452ca034d7820f1e014d839a488b86caebe3d 100644 (file)
@@ -298,7 +298,7 @@ Region::Region (const SourceList& srcs, const XMLNode& node)
 {
        use_sources (srcs);
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 
@@ -328,7 +328,7 @@ Region::Region (boost::shared_ptr<Source> src, const XMLNode& node)
 {
        _sources.push_back (src);
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 
@@ -1172,7 +1172,7 @@ Region::get_state ()
 }
 
 int
-Region::set_live_state (const XMLNode& node, Change& what_changed, bool send)
+Region::set_live_state (const XMLNode& node, int version, Change& what_changed, bool send)
 {
        const XMLNodeList& nlist = node.children();
        const XMLProperty *prop;
@@ -1355,7 +1355,7 @@ Region::set_state (const XMLNode& node, int version)
 
        _first_edit = EditChangesNothing;
 
-       set_live_state (node, what_changed, true);
+       set_live_state (node, version, what_changed, true);
 
        return 0;
 }
index 69aa2f700e071c3e337a06521ae1140244184c4f..f5122f3a5ffb59e53a37e07ef361a7e1ca189059 100644 (file)
@@ -58,7 +58,7 @@ Return::Return (Session& s, const XMLNode& node, bool internal)
        _amp.reset (new Amp (_session, boost::shared_ptr<MuteMaster>()));
        _meter.reset (new PeakMeter (_session));
 
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 
@@ -114,7 +114,7 @@ Return::set_state (const XMLNode& node, int version)
                }
        }
 
-       IOProcessor::set_state (*insert_node);
+       IOProcessor::set_state (*insert_node, version);
 
        return 0;
 }
index 7e453653dc900d8290b87190f875ccee2d6ed37e..5621f08049d142184a5c929164bd10b454c581fb 100644 (file)
@@ -96,7 +96,7 @@ Route::Route (Session& sess, string name, Flag flg, DataType default_type)
        _meter_connection = Metering::connect (mem_fun (*this, &Route::meter));
 }
 
-Route::Route (Session& sess, const XMLNode& node, int version, DataType default_type)
+Route::Route (Session& sess, const XMLNode& node, DataType default_type)
        : SessionObject (sess, "toBeReset")
        , AutomatableControls (sess)
        , _solo_control (new SoloControllable (X_("solo"), *this))
@@ -105,7 +105,7 @@ Route::Route (Session& sess, const XMLNode& node, int version, DataType default_
 {
        init ();
 
-       _set_state (node, version, false);
+       _set_state (node, Stateful::loading_state_version, false);
 
        /* now that we have _meter, its safe to connect to this */
 
@@ -748,7 +748,7 @@ Route::add_processor_from_xml (const XMLNode& node, ProcessorList::iterator iter
                        } else if (prop->value() == "meter") {
 
                                if (_meter) {
-                                       if (_meter->set_state (node)) {
+                                       if (_meter->set_state (node, Stateful::loading_state_version)) {
                                                return false;
                                        } else {
                                                return true;
@@ -763,7 +763,7 @@ Route::add_processor_from_xml (const XMLNode& node, ProcessorList::iterator iter
                                /* amp always exists */
 
                                processor = _amp;
-                               if (processor->set_state (node)) {
+                               if (processor->set_state (node, Stateful::loading_state_version)) {
                                        return false;
                                } else {
                                        /* never any reason to add it */
@@ -777,7 +777,7 @@ Route::add_processor_from_xml (const XMLNode& node, ProcessorList::iterator iter
                        } else if (prop->value() == "intreturn") {
 
                                if (_intreturn) {
-                                       if (_intreturn->set_state (node)) {
+                                       if (_intreturn->set_state (node, Stateful::loading_state_version)) {
                                                return false;
                                        } else {
                                                return true;
@@ -789,7 +789,7 @@ Route::add_processor_from_xml (const XMLNode& node, ProcessorList::iterator iter
                        } else if (prop->value() == "main-outs") {
 
                                if (_main_outs) {
-                                       if (_main_outs->set_state (node)) {
+                                       if (_main_outs->set_state (node, Stateful::loading_state_version)) {
                                                return false;
                                        } else {
                                                return true;
@@ -848,11 +848,11 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version, ProcessorLis
                                    prop->value() == "vst" ||
                                    prop->value() == "audiounit") {
                                        
-                                       processor.reset (new PluginInsert (_session, node, version));
+                                       processor.reset (new PluginInsert (_session, node));
                                        
                                } else {
                                        
-                                       processor.reset (new PortInsert (_session, _mute_master, node, version));
+                                       processor.reset (new PortInsert (_session, _mute_master, node));
                                }
 
                        }
@@ -1710,9 +1710,9 @@ Route::_set_state (const XMLNode& node, int version, bool /*call_base*/)
                        }
 
                        if (prop->value() == "Input") {
-                               _input->set_state (*child);
+                               _input->set_state (*child, version);
                        } else if (prop->value() == "Output") {
-                               _output->set_state (*child);
+                               _output->set_state (*child, version);
                        }
                }
 
@@ -1815,7 +1815,7 @@ Route::_set_state (const XMLNode& node, int version, bool /*call_base*/)
                } else if (child->name() == X_("Controllable") && (prop = child->property("name")) != 0) {
 
                        if (prop->value() == "solo") {
-                               _solo_control->set_state (*child);
+                               _solo_control->set_state (*child, version);
                                _session.add_controllable (_solo_control);
                        }
 
@@ -1827,7 +1827,7 @@ Route::_set_state (const XMLNode& node, int version, bool /*call_base*/)
                        }
 
                } else if (child->name() == X_("MuteMaster")) {
-                       _mute_master->set_state (*child);
+                       _mute_master->set_state (*child, version);
                }
        }
 
@@ -1887,6 +1887,11 @@ Route::_set_state_2X (const XMLNode& node, int version)
                child = *niter;
 
                if (child->name() == IO::state_node_name) {
+
+                       /* there is a note in IO::set_state_2X() about why we have to call
+                          this directly.
+                       */
+
                        _input->set_state_2X (*child, version, true);
                        _output->set_state_2X (*child, version, false);
 
@@ -2011,7 +2016,7 @@ Route::_set_state_2X (const XMLNode& node, int version)
                } else if (child->name() == X_("Controllable") && (prop = child->property("name")) != 0) {
                        
                        if (prop->value() == "solo") {
-                               _solo_control->set_state (*child);
+                               _solo_control->set_state (*child, version);
                                _session.add_controllable (_solo_control);
                        } 
 
@@ -2144,7 +2149,7 @@ Route::set_processor_state (const XMLNode& node)
 
                        // and make it (just) so
 
-                       (*i)->set_state (**niter);
+                       (*i)->set_state (**niter, Stateful::current_state_version);
                }
        }
 
index bd9eccaf542ddabe1aa56cdfd69b03e8cd0cbd6e..5a39c3322ac4318b151b45658b71f06009e7ee77 100644 (file)
@@ -167,7 +167,7 @@ Send::set_state (const XMLNode& node, int version)
 
        /* XXX need to load automation state & data for amp */
 
-       Delivery::set_state (*insert_node);
+       Delivery::set_state (*insert_node, version);
 
        return 0;
 }
index 79790b5673c69b213211ae6bc334d6a1ed4ed52f..d8c5639902a0430a70e266315cc511f9baf7249c 100644 (file)
@@ -353,6 +353,10 @@ Session::destroy ()
 
        delete state_tree;
 
+       /* reset dynamic state version back to default */
+       
+       Stateful::loading_state_version = 0;
+
        terminate_butler_thread ();
        //terminate_midi_thread ();
 
@@ -547,7 +551,7 @@ Session::when_engine_running ()
 
                        /* existing state for Click */
 
-                       if (_click_io->set_state (*child->children().front()) == 0) {
+                       if (_click_io->set_state (*child->children().front(), Stateful::loading_state_version) == 0) {
 
                                _clicking = Config->get_clicking ();
 
index ffd68bb5a6972ef62441b5cbdd30c678563021f7..e7c9819d20dc538db153b2f5cc1b5796f0753bbb 100644 (file)
@@ -164,7 +164,7 @@ Session::GlobalRouteStateCommand::GlobalRouteStateCommand (Session& s, void* p)
 Session::GlobalRouteStateCommand::GlobalRouteStateCommand (Session& s, const XMLNode& node)
        : sess (s), src (this)
 {
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor ();
        }
 }
@@ -389,7 +389,7 @@ Session::GlobalMeteringStateCommand::GlobalMeteringStateCommand(Session &s, void
 Session::GlobalMeteringStateCommand::GlobalMeteringStateCommand (Session& s, const XMLNode& node)
        : sess (s), src (this)
 {
-       if (set_state (node)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor();
        }
 }
index de99558c16745db293147be42a137d7d1d102152..a0254fab6e5b841436369c4775db9a768ba2bdfa 100644 (file)
@@ -6,7 +6,7 @@
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
@@ -311,7 +311,7 @@ Session::second_stage_init (bool new_session)
        // to call setup_raid_path() here.
 
        if (state_tree) {
-               if (set_state (*state_tree->root())) {
+               if (set_state (*state_tree->root(), Stateful::loading_state_version)) {
                        return -1;
                }
        } else {
@@ -756,7 +756,7 @@ int
 Session::restore_state (string snapshot_name)
 {
        if (load_state (snapshot_name) == 0) {
-               set_state (*state_tree->root());
+               set_state (*state_tree->root(), Stateful::loading_state_version);
        }
 
        return 0;
@@ -824,20 +824,20 @@ Session::load_state (string snapshot_name)
        }
 
        const XMLProperty* prop;
-       bool is_old = false; // session is _very_ old (pre-2.0)
 
        if ((prop = root.property ("version")) == 0) {
                /* no version implies very old version of Ardour */
-               is_old = true;
+               Stateful::loading_state_version = 1000;
        } else {
-               int major_version;
-               major_version = atoi (prop->value().c_str()); // grab just the first number before the period
-               if (major_version < 2) {
-                       is_old = true;
-               }
-       }
+               int major;
+               int minor;
+               int micro;
 
-       if (is_old) {
+               sscanf (prop->value().c_str(), "%d.%d.%d", &major, &minor, &micro);
+               Stateful::loading_state_version = (major * 1000) + minor;
+       }
+               
+       if (Stateful::loading_state_version < CURRENT_SESSION_FILE_VERSION) {
 
                sys::path backup_path(_session_dir->root_path());
 
@@ -1212,7 +1212,7 @@ Session::set_state (const XMLNode& node, int version)
        if (version >= 3000) {
                if ((child = find_named_node (node, "Metadata")) == 0) {
                        warning << _("Session: XML state has no metadata section") << endmsg;
-               } else if (_metadata->set_state (*child)) {
+               } else if (_metadata->set_state (*child, version)) {
                        goto out;
                }
        }
@@ -1220,7 +1220,7 @@ Session::set_state (const XMLNode& node, int version)
        if ((child = find_named_node (node, "Locations")) == 0) {
                error << _("Session: XML state has no locations section") << endmsg;
                goto out;
-       } else if (_locations.set_state (*child)) {
+       } else if (_locations.set_state (*child, version)) {
                goto out;
        }
 
@@ -1331,7 +1331,7 @@ Session::set_state (const XMLNode& node, int version)
        if ((child = find_named_node (node, "TempoMap")) == 0) {
                error << _("Session: XML state has no Tempo Map section") << endmsg;
                goto out;
-       } else if (_tempo_map->set_state (*child)) {
+       } else if (_tempo_map->set_state (*child, version)) {
                goto out;
        }
 
@@ -1345,7 +1345,7 @@ Session::set_state (const XMLNode& node, int version)
        if ((child = find_named_node (node, "Click")) == 0) {
                warning << _("Session: XML state has no click section") << endmsg;
        } else if (_click_io) {
-               _click_io->set_state (*child);
+               _click_io->set_state (*child, version);
        }
 
        if ((child = find_named_node (node, "ControlProtocols")) != 0) {
@@ -1419,7 +1419,7 @@ Session::XMLRouteFactory (const XMLNode& node, int version)
                        return ret;
                }
        } else {
-               boost::shared_ptr<Route> ret (new Route (*this, node, version));
+               boost::shared_ptr<Route> ret (new Route (*this, node));
                return ret;
        }
 }
index 358cbb12576cc7b865278ebf9cf68b0d7fea8ca0..eb8d8449499d259257ab4782cf9c0f5787dddacd 100644 (file)
@@ -75,7 +75,7 @@ SMFSource::SMFSource (Session& s, const XMLNode& node, bool must_exist)
        , _last_ev_time_frames(0)
        , _smf_last_read_end (0)
 {
-       if (set_state(node)) {
+       if (set_state(node, Stateful::loading_state_version)) {
                throw failed_constructor ();
        }
 
@@ -331,15 +331,15 @@ SMFSource::get_state ()
 int
 SMFSource::set_state (const XMLNode& node, int version)
 {
-       if (Source::set_state (node)) {
+       if (Source::set_state (node, version)) {
                return -1;
        }
 
-       if (MidiSource::set_state (node)) {
+       if (MidiSource::set_state (node, version)) {
                return -1;
        }
 
-       if (FileSource::set_state (node)) {
+       if (FileSource::set_state (node, version)) {
                return -1;
        }
 
index 7ed4e584ce2606f33474daa5062be4bb48b998cf..fe8a8a1e0aecf02d419aa683cb7035d0ddf4401a 100644 (file)
@@ -68,7 +68,7 @@ Source::Source (Session& s, const XMLNode& node)
        _analysed = false;
        _in_use = 0;
 
-       if (set_state (node) || _type == DataType::NIL) {
+       if (set_state (node, Stateful::loading_state_version) || _type == DataType::NIL) {
                throw failed_constructor();
        }
 
index 1d37383fb5bc65424427939365ddcf1cb7261668..1f9f5186148b884affd6b7962a3d72e802965269 100644 (file)
@@ -99,5 +99,5 @@ TempoMapImporter::_cancel_move ()
 void
 TempoMapImporter::_move ()
 {
-       session.tempo_map().set_state (xml_tempo_map);
+       session.tempo_map().set_state (xml_tempo_map, Stateful::current_state_version);
 }
index ecd8208282720a26fbfb6c96c2d58f16b1e92fc6..ce208769f6c14a94e54469990e6e2c82cb6ef20b 100644 (file)
@@ -51,8 +51,8 @@ Track::Track (Session& sess, string name, Route::Flag flag, TrackMode mode, Data
        _mode = mode;
 }
 
-Track::Track (Session& sess, const XMLNode& node, int version, DataType default_type)
-       : Route (sess, node, version, default_type)
+Track::Track (Session& sess, const XMLNode& node, DataType default_type)
+       : Route (sess, node, default_type)
        , _rec_enable_control (new RecEnableControllable(*this))
 {
        _freeze_record.state = NoFreeze;
index 73b5960e03015c405116260099a934b97cba98ee..16ecb88c8da5a3e48a103babf39cfbf72cff0ad3 100644 (file)
@@ -15,10 +15,10 @@ ARDOUR::UserBundle::UserBundle (std::string const & n)
 
 }
 
-ARDOUR::UserBundle::UserBundle (XMLNode const & x, bool i)
+ARDOUR::UserBundle::UserBundle (XMLNode const & node, bool i)
        : Bundle (i)
 {
-       if (set_state (x)) {
+       if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor ();
        }
 }
index fd71f2e6a7ab4e418873ec756f8cd9bf5c037371..3711d631fc2dd6803a588edbad6b091d2e992a83 100644 (file)
@@ -19,6 +19,9 @@ LIBARDOUR_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
 # micro increment <=> no interface changes
 LIBARDOUR_LIB_VERSION = '3.0.0'
 
+# default state file version for this build
+CURRENT_SESSION_FILE_VERSION = 3000
+
 # Variables for 'waf dist'
 APPNAME = 'libardour'
 VERSION = LIBARDOUR_VERSION
@@ -224,6 +227,8 @@ def configure(conf):
        conf.define('HAVE_RUBBERBAND', 1) # controls whether we think we have it
        conf.define('USE_RUBBERBAND', 1)  # controls whether we actually use it
 
+       conf.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION)
+
        conf.check(header_name='sys/vfs.h', define_name='HAVE_SYS_VFS_H')
        conf.check(header_name='wordexp.h', define_name='HAVE_WORDEXP')
        
index 27986bc6e97640df111d31e0172537b852abb8f8..316ac8fdb977a7ea01103cdd7ea2ffc17ff9c956 100644 (file)
@@ -102,7 +102,7 @@ public:
        const PatchPrimaryKey&   patch_primary_key()   const { return _id; }
 
        XMLNode& get_state (void);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
 
 private:
        std::string        _number;
@@ -129,7 +129,7 @@ public:
        const PatchPrimaryKey* patch_primary_key()  const { return _id; }
 
        XMLNode& get_state (void);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
 
 private:
        std::string       _name;
@@ -203,7 +203,7 @@ public:
        }
 
        XMLNode& get_state (void);
-       int      set_state (const XMLNode& a_node, int version = 3000);
+       int      set_state (const XMLNode& a_node, int version);
 
 private:
        std::string _name;
@@ -227,7 +227,7 @@ public:
        void set_number(const std::string a_number)   { _number = a_number; }
 
        XMLNode& get_state (void);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
 
 private:
        std::string _number;
@@ -248,7 +248,7 @@ public:
        const Notes& notes() const { return _notes; }
 
        XMLNode& get_state (void);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
 
 private:
        std::string _name;
@@ -266,7 +266,7 @@ public:
 
        
        XMLNode& get_state (void);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
        
        std::string channel_name_set_name_by_channel(uint8_t channel) {
                assert(channel <= 15);
@@ -317,7 +317,7 @@ public:
        }
        
        XMLNode& get_state (void);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
        
 private:
        std::string           _manufacturer;
@@ -334,8 +334,8 @@ public:
        // Maps Model names to MasterDeviceNames
        typedef std::map<std::string, boost::shared_ptr<MasterDeviceNames> > MasterDeviceNamesList;
        
-       MIDINameDocument() {};
-       MIDINameDocument(const std::string &filename) : _document(XMLTree(filename)) { set_state(*_document.root()); };
+       MIDINameDocument() {}
+        MIDINameDocument(const std::string &filename);
        virtual ~MIDINameDocument() {};
 
        const std::string& author() const { return _author; }
@@ -346,7 +346,7 @@ public:
        const MasterDeviceNames::Models& all_models() const { return _all_models; }
                
        XMLNode& get_state (void);
-       int      set_state (const XMLNode&, int version = 3000);
+       int      set_state (const XMLNode&, int version);
 
 private:
        std::string                   _author;
index 815ebd4b37c1e8dca1a43c06402c86fdbed50904..d80e11d81ad63b93d4d0e1f9283ebddc719e1eb7 100644 (file)
@@ -144,7 +144,7 @@ NoteNameList::set_state (const XMLNode& node, int version)
                                        node.find("//Note");
        for (XMLSharedNodeList::const_iterator i = notes->begin(); i != notes->end(); ++i) {
                boost::shared_ptr<Note> note(new Note());
-               note->set_state(*(*i));
+               note->set_state(*(*i), version);
                _notes.push_back(note);
        }
        
@@ -184,7 +184,7 @@ PatchBank::set_state (const XMLNode& node, int version)
        const XMLNodeList patches = patch_name_list->children();
        for (XMLNodeList::const_iterator i = patches.begin(); i != patches.end(); ++i) {
                boost::shared_ptr<Patch> patch(new Patch(this));
-               patch->set_state(*(*i));
+               patch->set_state(*(*i), version);
                _patch_name_list.push_back(patch);
        }
        
@@ -251,7 +251,7 @@ ChannelNameSet::set_state (const XMLNode& node, int version)
                if (node->name() == "PatchBank") {
                        // cerr << "got PatchBank" << endl;
                        boost::shared_ptr<PatchBank> bank(new PatchBank());
-                       bank->set_state(*node);
+                       bank->set_state(*node, version);
                        _patch_banks.push_back(bank);
                        const PatchBank::PatchNameList& patches = bank->patch_name_list();
                        for (PatchBank::PatchNameList::const_iterator patch = patches.begin();
@@ -336,7 +336,7 @@ MasterDeviceNames::set_state(const XMLNode& a_node, int version)
             i != custom_device_modes->end();
             ++i) {
                boost::shared_ptr<CustomDeviceMode> custom_device_mode(new CustomDeviceMode());
-               custom_device_mode->set_state(*(*i));
+               custom_device_mode->set_state(*(*i), version);
                
                _custom_device_modes[custom_device_mode->name()] = custom_device_mode;
                _custom_device_mode_names.push_back(custom_device_mode->name());
@@ -350,7 +350,7 @@ MasterDeviceNames::set_state(const XMLNode& a_node, int version)
             ++i) {
                boost::shared_ptr<ChannelNameSet> channel_name_set(new ChannelNameSet());
                // cerr << "MasterDeviceNames::set_state ChannelNameSet before set_state" << endl;
-               channel_name_set->set_state(*(*i));
+               channel_name_set->set_state(*(*i), version);
                _channel_name_sets[channel_name_set->name()] = channel_name_set;
        }
 
@@ -361,7 +361,7 @@ MasterDeviceNames::set_state(const XMLNode& a_node, int version)
             i != note_name_lists->end();
             ++i) {
                boost::shared_ptr<NoteNameList> note_name_list(new NoteNameList());
-               note_name_list->set_state(*(*i));
+               note_name_list->set_state(*(*i), version);
                _note_name_lists.push_back(note_name_list);
        }
 
@@ -375,6 +375,12 @@ MasterDeviceNames::get_state(void)
        return nothing;
 }
 
+MIDINameDocument::MIDINameDocument (const string& filename)
+       : _document(XMLTree(filename)) 
+{ 
+       set_state(*_document.root(), 0); 
+}
+
 int
 MIDINameDocument::set_state(const XMLNode& a_node, int version)
 {
@@ -391,7 +397,7 @@ MIDINameDocument::set_state(const XMLNode& a_node, int version)
             ++i) {
                boost::shared_ptr<MasterDeviceNames> master_device_names(new MasterDeviceNames());
                // cerr << "MIDINameDocument::set_state before masterdevicenames->set_state" << endl;
-               master_device_names->set_state(*(*i));
+               master_device_names->set_state(*(*i), version);
                // cerr << "MIDINameDocument::set_state after masterdevicenames->set_state" << endl;
                
                for (MasterDeviceNames::Models::const_iterator model = master_device_names->models().begin();
index f913dec5b7b448f822b3ce456e68fb7d575c01ea..8e85e288822c868fa97fc4f456f57992255926cb 100644 (file)
@@ -38,7 +38,7 @@ public:
        virtual void redo() { (*this)(); }
        
        virtual XMLNode &get_state();
-       virtual int set_state(const XMLNode&, int version = 3000) { /* noop */ return 0; }
+       virtual int set_state(const XMLNode&, int version) { /* noop */ return 0; }
 
 protected:
        Command() {}
index 4afcb5374004526232c2390034a4e4f02dd9c135..1ab649f8b9eb4a4fcafe56e486d01fa9684aae1b 100644 (file)
@@ -51,7 +51,7 @@ class Controllable : public PBD::StatefulDestructible {
 
        sigc::signal<void> Changed;
 
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
        XMLNode& get_state ();
 
        std::string name()      const { return _name; }
index b1347c169d827054719e653ace891019bf7d8e88..c1e5d75f9c15f4ff3e3208a1bd50f09a9605b23b 100644 (file)
@@ -54,13 +54,13 @@ public:
 
        void operator() () {
                if (after) {
-                       obj.set_state(*after); 
+                       obj.set_state(*after, Stateful::current_state_version); 
                }
        }
 
        void undo() { 
                if (before) {
-                       obj.set_state(*before); 
+                       obj.set_state(*before, Stateful::current_state_version); 
                }
        }
 
index 324d9c1222baab508404149450c7941abbca3655..0204c8084a9e3d0d7d25ba7cf32431d9bc8e7999 100644 (file)
@@ -38,7 +38,7 @@ class Stateful {
 
        virtual XMLNode& get_state (void) = 0;
 
-       virtual int set_state (const XMLNode&, int version = 3000) = 0;
+       virtual int set_state (const XMLNode&, int version) = 0;
 
        /* Extra XML nodes */
 
@@ -47,6 +47,9 @@ class Stateful {
 
        const PBD::ID& id() const { return _id; }
 
+       static int current_state_version;
+       static int loading_state_version;
+
   protected:
 
        void add_instant_xml (XMLNode&, const sys::path& directory_path);
index 12ae4306eda9572068c85c459492803b53554fe4..58be141a275a846c523b39e3fd5d9c3e61d4a814 100644 (file)
@@ -31,6 +31,9 @@ using namespace std;
 
 namespace PBD {
 
+int Stateful::current_state_version = 0;
+int Stateful::loading_state_version = 0;
+
 Stateful::Stateful ()
 {
        _extra_xml = 0;
index b3cd5746a6c0339a90550e8ce63aad44b92a35f7..af82471a9099e5f06f40394c1a947c18f8776494 100644 (file)
@@ -371,7 +371,7 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
                                
                                if (c) {
                                        MIDIControllable* mc = new MIDIControllable (*_port, *c);
-                                       if (mc->set_state (**niter) == 0) {
+                                       if (mc->set_state (**niter, version) == 0) {
                                                controllables.insert (mc);
                                        }
                                        
index 6a81eda02194f37685ba3e5ed3beb970e551a258..6473a869ae4a56c50407d7bc927c8e56e324fa0e 100644 (file)
@@ -36,7 +36,7 @@ class GenericMidiControlProtocol : public ARDOUR::ControlProtocol {
        bool get_feedback () const;
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
   private:
        MIDI::Port* _port;
index b2805744a39f037863400b08e13dd7218059013a..f0b973f0f0c0cdcbb42ba28b0704c26e6577989a 100644 (file)
@@ -64,7 +64,7 @@ class MIDIControllable : public PBD::Stateful
        std::string control_description() const { return _control_description; }
 
        XMLNode& get_state (void);
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        void bind_midi (MIDI::channel_t, MIDI::eventType, MIDI::byte);
        MIDI::channel_t get_control_channel () { return control_channel; }
index 3d1dea1ed47dce3466d0550b481d03e4277ce3e8..12aea1c0ae9cd6a18915c404d9375fc2ab2c1140 100644 (file)
@@ -78,7 +78,7 @@ class MackieControlProtocol
        int set_active (bool yn);
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
   
        static bool probe();
        
index a814726b4e5bfd1f603c88a987526b52bfea58b1..d0bc509f173c7f0161caa17a260e2823d5f80606 100644 (file)
@@ -49,7 +49,7 @@ class OSC : public ARDOUR::ControlProtocol
        virtual ~OSC();
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
        int set_active (bool yn);
        bool get_active () const;
index b5021aa397f22680e2a1adc78fcc6c801c6a60ef..bb80874e5e957ccb52e42c93b54003b69f4945bb 100644 (file)
@@ -44,7 +44,7 @@ class OSCControllable : public PBD::Stateful
        lo_address address() const { return addr; }
 
        XMLNode& get_state ();
-       int set_state (const XMLNode& node, int version = 3000);
+       int set_state (const XMLNode& node, int version);
 
   protected:
        boost::shared_ptr<PBD::Controllable> controllable;
index d03fb1fce4320e87fd1d56ce69099c479b7afd21..b8fd2b57892c2c41fe81d932f73249a9e7737b1a 100644 (file)
@@ -16,7 +16,7 @@ class PowermateControlProtocol : public ARDOUR::ControlProtocol
        static bool probe ();
 
        XMLNode& get_state ();
-       int set_state (const XMLNode&, int version = 3000);
+       int set_state (const XMLNode&, int version);
 
   private: