diff options
author | Robin Gareus <robin@gareus.org> | 2017-10-04 00:35:29 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-10-04 00:54:55 +0200 |
commit | e31f5d999837b0d0d63dc824c50e9da4acca7244 (patch) | |
tree | ef4712ccd25e8cc651ffabcd16e120571c21921d /libs/ardour/ardour | |
parent | 5dd9acf9ab39306277652c28fb5ac4af330e0af0 (diff) |
Clean up State API:
* Processor implement get_state(), classes derived from Processor
implement protected ::state() -- as documented in processor.h
* likewise for Route, Track: make ::state() a protected interface
* removal of "full_state", use explicit "template_save"
* use RAII/Unwind to skip saving automation-state
Diffstat (limited to 'libs/ardour/ardour')
30 files changed, 98 insertions, 82 deletions
diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h index c0ff59d9e7..9ca2b9a404 100644 --- a/libs/ardour/ardour/amp.h +++ b/libs/ardour/ardour/amp.h @@ -53,7 +53,7 @@ public: void setup_gain_automation (samplepos_t start_sample, samplepos_t end_sample, samplecnt_t nframes); - XMLNode& state (bool full); + XMLNode& state (); int set_state (const XMLNode&, int version); static gain_t apply_gain (BufferSet& bufs, samplecnt_t sample_rate, samplecnt_t nframes, gain_t initial, gain_t target, bool midi_amp = true); diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h index 96cea7e1fe..aecf5d2c9f 100644 --- a/libs/ardour/ardour/audio_track.h +++ b/libs/ardour/ardour/audio_track.h @@ -51,7 +51,7 @@ class LIBARDOUR_API AudioTrack : public Track boost::shared_ptr<AudioFileSource> write_source (uint32_t n = 0); protected: - XMLNode& state (bool full); + XMLNode& state (bool save_template); private: int deprecated_use_diskstream_connections (); diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h index 84164568c5..c7db1c7a21 100644 --- a/libs/ardour/ardour/automatable.h +++ b/libs/ardour/ardour/automatable.h @@ -52,6 +52,8 @@ public: virtual ~Automatable(); + static bool skip_saving_automation; // to be used only by session-state + boost::shared_ptr<Evoral::Control> control_factory(const Evoral::Parameter& id); boost::shared_ptr<AutomationControl> automation_control (PBD::ID const & id) const; diff --git a/libs/ardour/ardour/automation_list.h b/libs/ardour/ardour/automation_list.h index d6de3decda..5ef92735f8 100644 --- a/libs/ardour/ardour/automation_list.h +++ b/libs/ardour/ardour/automation_list.h @@ -125,7 +125,7 @@ private: void create_curve_if_necessary (); int deserialize_events (const XMLNode&); - XMLNode& state (bool full, bool need_lock); + XMLNode& state (bool save_auto_state, bool need_lock); XMLNode& serialize_events (bool need_lock); void maybe_signal_changed (); diff --git a/libs/ardour/ardour/capturing_processor.h b/libs/ardour/ardour/capturing_processor.h index fe548d7bbc..12d999c0c3 100644 --- a/libs/ardour/ardour/capturing_processor.h +++ b/libs/ardour/ardour/capturing_processor.h @@ -28,23 +28,24 @@ namespace ARDOUR { class LIBARDOUR_API CapturingProcessor : public Processor { - public: +public: CapturingProcessor (Session & session, samplecnt_t latency); ~CapturingProcessor(); - public: // main interface +public: // main interface BufferSet const & get_capture_buffers() const { return capture_buffers; } - public: // Processor overrides +public: // Processor overrides bool display_to_user() const { return false; } int set_block_size (pframes_t nframes); void run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool result_required); bool configure_io (ChanCount in, ChanCount out); bool can_support_io_configuration (const ChanCount& in, ChanCount& out); - virtual XMLNode& state (bool); - private: +protected: + XMLNode& state (); +private: void realloc_buffers(); samplecnt_t block_size; diff --git a/libs/ardour/ardour/delayline.h b/libs/ardour/ardour/delayline.h index 80a032374e..0618374295 100644 --- a/libs/ardour/ardour/delayline.h +++ b/libs/ardour/ardour/delayline.h @@ -56,7 +56,8 @@ public: bool set_name (const std::string& str); - XMLNode& state (bool full); +protected: + XMLNode& state (); private: void allocate_pending_buffers (samplecnt_t); diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h index ce5b050982..451d7bdd0c 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -84,7 +84,6 @@ public: PBD::Signal0<void> MuteChange; - XMLNode& state (bool full); int set_state (const XMLNode&, int version); /* Panning */ @@ -103,7 +102,9 @@ public: uint32_t pans_required() const { return _configured_input.n_audio(); } virtual uint32_t pan_outs() const; - protected: +protected: + XMLNode& state (); + Role _role; BufferSet* _output_buffers; gain_t _current_gain; @@ -111,7 +112,7 @@ public: gain_t target_gain (); - private: +private: bool _no_outs_cuz_we_no_monitor; boost::shared_ptr<MuteMaster> _mute_master; diff --git a/libs/ardour/ardour/disk_reader.h b/libs/ardour/ardour/disk_reader.h index 4bc78cbd67..cb37bc6cb1 100644 --- a/libs/ardour/ardour/disk_reader.h +++ b/libs/ardour/ardour/disk_reader.h @@ -35,7 +35,7 @@ template<typename T> class MidiRingBuffer; class LIBARDOUR_API DiskReader : public DiskIOProcessor { - public: +public: DiskReader (Session&, std::string const & name, DiskIOProcessor::Flag f = DiskIOProcessor::Flag (0)); ~DiskReader (); @@ -52,7 +52,6 @@ class LIBARDOUR_API DiskReader : public DiskIOProcessor int overwrite_existing_buffers (); void set_pending_overwrite (bool yn); - virtual XMLNode& state (bool full); int set_state (const XMLNode&, int version); PBD::Signal0<void> AlignmentStyleChanged; @@ -99,17 +98,19 @@ class LIBARDOUR_API DiskReader : public DiskIOProcessor static void set_no_disk_output (bool yn); static bool no_disk_output() { return _no_disk_output; } - protected: +protected: friend class Track; friend class MidiTrack; + XMLNode& state (); + void resolve_tracker (Evoral::EventSink<samplepos_t>& buffer, samplepos_t time); void playlist_changed (const PBD::PropertyChange&); int use_playlist (DataType, boost::shared_ptr<Playlist>); void playlist_ranges_moved (std::list< Evoral::RangeMove<samplepos_t> > const &, bool); - private: +private: /** The number of samples by which this diskstream's output should be delayed with respect to the transport sample. This is used for latency compensation. */ diff --git a/libs/ardour/ardour/disk_writer.h b/libs/ardour/ardour/disk_writer.h index 59267f5f8f..11d795c11a 100644 --- a/libs/ardour/ardour/disk_writer.h +++ b/libs/ardour/ardour/disk_writer.h @@ -55,7 +55,6 @@ public: void non_realtime_locate (samplepos_t); void realtime_handle_transport_stopped (); - virtual XMLNode& state (bool full); int set_state (const XMLNode&, int version); virtual bool set_write_source_name (const std::string& str); @@ -133,6 +132,9 @@ public: protected: friend class Track; + + virtual XMLNode& state (); + int do_flush (RunContext context, bool force = false); void get_input_sources (); diff --git a/libs/ardour/ardour/internal_return.h b/libs/ardour/ardour/internal_return.h index dbc9bab3f2..71b8fc354d 100644 --- a/libs/ardour/ardour/internal_return.h +++ b/libs/ardour/ardour/internal_return.h @@ -31,12 +31,9 @@ class InternalSend; class LIBARDOUR_API InternalReturn : public Return { - public: +public: InternalReturn (Session&); - XMLNode& state (bool full); - XMLNode& get_state (); - void run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool); bool configure_io (ChanCount, ChanCount); bool can_support_io_configuration (const ChanCount& in, ChanCount& out); @@ -46,7 +43,10 @@ class LIBARDOUR_API InternalReturn : public Return void set_playback_offset (samplecnt_t cnt); - private: +protected: + XMLNode& state (); + +private: /** sends that we are receiving data from */ std::list<InternalSend*> _sends; /** mutex to protect _sends */ diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h index c46236c559..8547f73b08 100644 --- a/libs/ardour/ardour/internal_send.h +++ b/libs/ardour/ardour/internal_send.h @@ -27,7 +27,7 @@ namespace ARDOUR { class LIBARDOUR_API InternalSend : public Send { - public: +public: InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_from, boost::shared_ptr<Route> send_to, Delivery::Role role = Delivery::Aux, bool ignore_bitslot = false); virtual ~InternalSend (); @@ -35,8 +35,6 @@ class LIBARDOUR_API InternalSend : public Send bool set_name (const std::string&); bool visible() const; - XMLNode& state(bool full); - XMLNode& get_state(void); int set_state(const XMLNode& node, int version); void cycle_start (pframes_t); @@ -62,7 +60,10 @@ class LIBARDOUR_API InternalSend : public Send static PBD::Signal1<void, pframes_t> CycleStart; - private: +protected: + XMLNode& state(); + +private: BufferSet mixbufs; boost::shared_ptr<Route> _send_from; boost::shared_ptr<Route> _send_to; diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index 0eacaa973a..48f3653c2b 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -67,7 +67,7 @@ class UserBundle; */ class LIBARDOUR_API IO : public SessionObject, public Latent { - public: +public: static const std::string state_node_name; enum Direction { @@ -147,8 +147,8 @@ class LIBARDOUR_API IO : public SessionObject, public Latent */ PBD::Signal2<void, IOChange, void *> changed; - virtual XMLNode& state (bool full); XMLNode& get_state (void); + int set_state (const XMLNode&, int version); int set_state_2X (const XMLNode&, int, bool); static void prepare_for_reset (XMLNode&, const std::string&); @@ -205,17 +205,17 @@ class LIBARDOUR_API IO : public SessionObject, public Latent int set_ports (const std::string& str); - private: - mutable Glib::Threads::Mutex io_lock; +protected: + virtual XMLNode& state (); - protected: PortSet _ports; Direction _direction; DataType _default_type; bool _active; bool _sendish; - private: +private: + mutable Glib::Threads::Mutex io_lock; int connecting_became_legal (); PBD::ScopedConnection connection_legal_c; diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index f17c338155..7dcbb630ab 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -74,7 +74,7 @@ class LIBARDOUR_API IOProcessor : public Processor PBD::Signal2<void,IOProcessor*,bool> AutomationPlaybackChanged; PBD::Signal2<void,IOProcessor*,uint32_t> AutomationChanged; - XMLNode& state (bool full_state); + XMLNode& state (); int set_state (const XMLNode&, int version); static void prepare_for_reset (XMLNode& state, const std::string& name); diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h index 9e432c1180..25fda7400a 100644 --- a/libs/ardour/ardour/lv2_plugin.h +++ b/libs/ardour/ardour/lv2_plugin.h @@ -63,7 +63,7 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee LV2Plugin (const LV2Plugin &); ~LV2Plugin (); - static bool force_state_save; + static bool force_state_save; // to be used only by session-state std::string unique_id () const; const char* uri () const; diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h index 52ca751932..1f7ad30216 100644 --- a/libs/ardour/ardour/meter.h +++ b/libs/ardour/ardour/meter.h @@ -77,10 +77,12 @@ public: void set_type(MeterType t); MeterType get_type() { return _meter_type; } - XMLNode& state (bool full); PBD::Signal1<void, MeterType> TypeChanged; +protected: + XMLNode& state (); + private: friend class IO; diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index 417d7688f6..abee445e01 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -133,7 +133,8 @@ public: PBD::Signal0<void> InputActiveChanged; protected: - XMLNode& state (bool full); + + XMLNode& state (bool save_template); void act_on_mute (); void monitoring_changed (bool, PBD::Controllable::GroupControlDisposition); diff --git a/libs/ardour/ardour/monitor_processor.h b/libs/ardour/ardour/monitor_processor.h index 1d537c0937..63e153e48e 100644 --- a/libs/ardour/ardour/monitor_processor.h +++ b/libs/ardour/ardour/monitor_processor.h @@ -126,7 +126,7 @@ public: void run (BufferSet& /*bufs*/, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t /*nframes*/, bool /*result_required*/); - XMLNode& state (bool full); + XMLNode& state (); int set_state (const XMLNode&, int /* version */); bool configure_io (ChanCount in, ChanCount out); diff --git a/libs/ardour/ardour/pannable.h b/libs/ardour/ardour/pannable.h index f96670afec..afdb512342 100644 --- a/libs/ardour/ardour/pannable.h +++ b/libs/ardour/ardour/pannable.h @@ -38,7 +38,7 @@ class Panner; class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef { - public: +public: Pannable (Session& s); ~Pannable (); @@ -73,12 +73,13 @@ class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public bool touch_enabled() const { return _auto_state & (Touch | Latch); } XMLNode& get_state (); - XMLNode& state (bool full_state); int set_state (const XMLNode&, int version); bool has_state() const { return _has_state; } - protected: +protected: + virtual XMLNode& state (); + boost::weak_ptr<Panner> _panner; AutoState _auto_state; gint _touching; @@ -87,7 +88,7 @@ class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public void control_auto_state_changed (AutoState); - private: +private: void value_changed (); }; diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index 1076c5198f..e13986c2c7 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -50,14 +50,12 @@ class Plugin; */ class LIBARDOUR_API PluginInsert : public Processor { - public: +public: PluginInsert (Session&, boost::shared_ptr<Plugin> = boost::shared_ptr<Plugin>()); ~PluginInsert (); static const std::string port_automation_node_name; - XMLNode& state(bool); - XMLNode& get_state(void); int set_state(const XMLNode&, int version); void update_id (PBD::ID); void set_owner (SessionObject*); @@ -215,7 +213,7 @@ class LIBARDOUR_API PluginInsert : public Processor double get_value (void) const; XMLNode& get_state(); - protected: + protected: void actually_set_value (double value, PBD::Controllable::GroupControlDisposition); private: @@ -301,7 +299,10 @@ class LIBARDOUR_API PluginInsert : public Processor bool custom_cfg; ///< custom config (if not strict) }; - private: +protected: + XMLNode& state (); + +private: /* disallow copy construction */ PluginInsert (const PluginInsert&); diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h index 2461f8a90f..e96779c63e 100644 --- a/libs/ardour/ardour/port_insert.h +++ b/libs/ardour/ardour/port_insert.h @@ -45,12 +45,10 @@ class Pannable; */ class LIBARDOUR_API PortInsert : public IOProcessor { - public: +public: PortInsert (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster> mm); ~PortInsert (); - XMLNode& state(bool full); - XMLNode& get_state(void); int set_state (const XMLNode&, int version); void run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool); @@ -82,7 +80,9 @@ class LIBARDOUR_API PortInsert : public IOProcessor static std::string name_and_id_new_insert (Session&, uint32_t&); - private: +protected: + XMLNode& state (); +private: /* disallow copy construction */ PortInsert (const PortInsert&); diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index 8dfc1494d3..f3325a1194 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -120,8 +120,7 @@ class LIBARDOUR_API Processor : public SessionObject, public Automatable, public smoothly. */ - virtual XMLNode& state (bool full); - XMLNode& get_state (void); + XMLNode& get_state (); int set_state (const XMLNode&, int version); virtual void set_pre_fader (bool); @@ -147,6 +146,7 @@ class LIBARDOUR_API Processor : public SessionObject, public Automatable, public SessionObject* owner() const; protected: + virtual XMLNode& state (); virtual int set_state_2X (const XMLNode&, int version); int _pending_active; diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index 1ae75d1469..a147a6163a 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -88,7 +88,7 @@ class LIBARDOUR_API Region , public Trimmable , public Movable { - public: +public: typedef std::vector<boost::shared_ptr<Source> > SourceList; static void make_property_quarks (); @@ -281,7 +281,6 @@ class LIBARDOUR_API Region /* serialization */ XMLNode& get_state (); - virtual XMLNode& state (); virtual int set_state (const XMLNode&, int version); virtual boost::shared_ptr<Region> get_parent() const; @@ -344,7 +343,9 @@ class LIBARDOUR_API Region void drop_sources (); - protected: +protected: + virtual XMLNode& state (); + friend class RegionFactory; /** Construct a region from multiple sources*/ @@ -366,7 +367,7 @@ class LIBARDOUR_API Region return false; } - protected: +protected: void send_change (const PBD::PropertyChange&); virtual int _set_state (const XMLNode&, int version, PBD::PropertyChange& what_changed, bool send_signal); @@ -412,7 +413,7 @@ class LIBARDOUR_API Region samplepos_t _transient_analysis_start; samplepos_t _transient_analysis_end; - private: +private: void mid_thaw (const PBD::PropertyChange&); virtual void trim_to_internal (samplepos_t position, samplecnt_t length, const int32_t sub_num); diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h index 18845f9815..0dbf5eb1d3 100644 --- a/libs/ardour/ardour/return.h +++ b/libs/ardour/ardour/return.h @@ -51,8 +51,6 @@ public: bool metering() const { return _metering; } void set_metering (bool yn) { _metering = yn; } - XMLNode& state(bool full); - XMLNode& get_state(void); int set_state(const XMLNode&, int version); uint32_t pans_required() const { return _configured_input.n_audio(); } @@ -63,7 +61,9 @@ public: static uint32_t how_many_returns(); static std::string name_and_id_new_return (Session&, uint32_t&); - protected: +protected: + XMLNode& state(); + bool _metering; boost::shared_ptr<GainControl> _gain_control; boost::shared_ptr<Amp> _amp; diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 830ef4bab3..8500232c27 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -390,10 +390,9 @@ public: PBD::Signal0<void> io_changed; /* stateful */ - XMLNode& get_state(); + XMLNode& get_template(); virtual int set_state (const XMLNode&, int version); - virtual XMLNode& get_template(); XMLNode& get_processor_state (); void set_processor_state (const XMLNode&); @@ -674,7 +673,7 @@ protected: virtual ChanCount input_streams () const; - virtual XMLNode& state(bool); + virtual XMLNode& state (bool save_template); int configure_processors (ProcessorStreams*); diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index 8d9cdaa0af..c37055cd94 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -36,7 +36,7 @@ class DelayLine; class LIBARDOUR_API Send : public Delivery { - public: +public: Send (Session&, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send, bool ignore_bitslot = false); virtual ~Send (); @@ -51,8 +51,6 @@ class LIBARDOUR_API Send : public Delivery bool metering() const { return _metering; } void set_metering (bool yn) { _metering = yn; } - XMLNode& state (bool full); - XMLNode& get_state (); int set_state(const XMLNode&, int version); PBD::Signal0<void> SelfDestruct; @@ -83,7 +81,9 @@ class LIBARDOUR_API Send : public Delivery static uint32_t how_many_sends(); static std::string name_and_id_new_send (Session&, Delivery::Role r, uint32_t&, bool); - protected: +protected: + XMLNode& state (); + bool _metering; boost::shared_ptr<GainControl> _gain_control; boost::shared_ptr<Amp> _amp; @@ -91,7 +91,7 @@ class LIBARDOUR_API Send : public Delivery boost::shared_ptr<DelayLine> _send_delay; boost::shared_ptr<DelayLine> _thru_delay; - private: +private: /* disallow copy construction */ Send (const Send&); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 88195e626a..d7c621d51f 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -563,10 +563,7 @@ public: std::vector<std::string> possible_states() const; static std::vector<std::string> possible_states (std::string path); - XMLNode& get_state(); - int set_state(const XMLNode& node, int version); // not idempotent - XMLNode& get_template(); - bool export_track_state (boost::shared_ptr<RouteList> rl, const std::string& path); + bool export_track_state (boost::shared_ptr<RouteList> rl, const std::string& path); /// The instant xml file is written to the session directory void add_instant_xml (XMLNode&, bool write_to_config = true); @@ -1903,7 +1900,11 @@ private: SwitchToSnapshot }; - XMLNode& state(bool, snapshot_t snapshot_type = NormalSave); + XMLNode& state (bool save_template, snapshot_t snapshot_type = NormalSave); + + XMLNode& get_state (); + int set_state (const XMLNode& node, int version); // not idempotent + XMLNode& get_template (); /* click track */ typedef std::list<Click*> Clicks; diff --git a/libs/ardour/ardour/session_playlists.h b/libs/ardour/ardour/session_playlists.h index 273b12d040..66f4f2c537 100644 --- a/libs/ardour/ardour/session_playlists.h +++ b/libs/ardour/ardour/session_playlists.h @@ -73,7 +73,7 @@ private: void find_equivalent_playlist_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >& result); void update_after_tempo_map_change (); - void add_state (XMLNode *, bool); + void add_state (XMLNode*, bool save_template, bool include_unused); bool maybe_delete_unused (boost::function<int(boost::shared_ptr<Playlist>)>); int load (Session &, const XMLNode&); int load_unused (Session &, const XMLNode&); diff --git a/libs/ardour/ardour/sidechain.h b/libs/ardour/ardour/sidechain.h index f3755496c2..dd608c8951 100644 --- a/libs/ardour/ardour/sidechain.h +++ b/libs/ardour/ardour/sidechain.h @@ -39,8 +39,10 @@ public: bool can_support_io_configuration (const ChanCount& in, ChanCount& out); bool configure_io (ChanCount in, ChanCount out); - XMLNode& state(bool full); - int set_state(const XMLNode&, int version); + int set_state(const XMLNode&, int version); + +protected: + XMLNode& state (); private: /* disallow copy construction */ diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index 7b21a77591..6b024274f0 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -50,7 +50,7 @@ class RecordSafeControl; */ class LIBARDOUR_API Track : public Route, public Recordable { - public: +public: Track (Session&, std::string name, PresentationInfo::Flag f = PresentationInfo::Flag (0), TrackMode m = Normal, DataType default_type = DataType::AUDIO); virtual ~Track (); @@ -110,8 +110,6 @@ class LIBARDOUR_API Track : public Route, public Recordable virtual int export_stuff (BufferSet& bufs, samplepos_t start_sample, samplecnt_t nframes, boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze) = 0; - XMLNode& get_state(); - XMLNode& get_template(); virtual int set_state (const XMLNode&, int version); static void zero_diskstream_id_in_xml (XMLNode&); @@ -175,8 +173,8 @@ class LIBARDOUR_API Track : public Route, public Recordable PBD::Signal0<void> SpeedChanged; PBD::Signal0<void> AlignmentStyleChanged; - protected: - XMLNode& state (bool full); +protected: + XMLNode& state (bool save_template); boost::shared_ptr<Playlist> _playlists[DataType::num_types]; diff --git a/libs/ardour/ardour/unknown_processor.h b/libs/ardour/ardour/unknown_processor.h index 33d32f5b34..c329da201e 100644 --- a/libs/ardour/ardour/unknown_processor.h +++ b/libs/ardour/ardour/unknown_processor.h @@ -48,7 +48,8 @@ public: bool can_support_io_configuration (const ChanCount &, ChanCount &); void run (BufferSet& /*bufs*/, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t /*nframes*/, bool /*result_required*/); - XMLNode & state (bool); +protected: + XMLNode& state (); private: XMLNode _state; |