X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fio.h;h=b718cfa5c9aeeed5b22ef460892d481f929a7ff7;hb=aae367b63c9b619db1e40f27dc334c6987219481;hp=858302442ea1bffd4d3657a8bd05003c768cbd92;hpb=def335e427f46513436884bf81d10caf96d7c482;p=ardour.git diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index 858302442e..b718cfa5c9 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2000 Paul Davis + Copyright (C) 2000 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,14 +23,13 @@ #include #include #include -#include #include #include #include "pbd/fastlog.h" #include "pbd/undo.h" -#include "pbd/statefuldestructible.h" +#include "pbd/statefuldestructible.h" #include "pbd/controllable.h" #include "ardour/ardour.h" @@ -78,7 +77,7 @@ class IO : public SessionObject, public Latent IO (Session&, const std::string& name, Direction, DataType default_type = DataType::AUDIO); IO (Session&, const XMLNode&, DataType default_type = DataType::AUDIO); - + virtual ~IO(); Direction direction() const { return _direction; } @@ -88,7 +87,7 @@ class IO : public SessionObject, public Latent bool active() const { return _active; } void set_active(bool yn) { _active = yn; } - + bool set_name (const std::string& str); virtual void silence (nframes_t); @@ -101,7 +100,7 @@ class IO : public SessionObject, public Latent BundleList bundles_connected (); boost::shared_ptr bundle () { return _bundle; } - + int add_port (std::string connection, void *src, DataType type = DataType::NIL); int remove_port (Port *, void *src); int connect (Port *our_port, std::string other_port, void *src); @@ -133,18 +132,19 @@ class IO : public SessionObject, public Latent const ChanCount& n_ports () const { return _ports.count(); } - sigc::signal changed; + PBD::Signal2 changed; virtual XMLNode& state (bool full); XMLNode& get_state (void); - int set_state (const XMLNode&); + int set_state (const XMLNode&, int version); + int set_state_2X (const XMLNode&, int, bool); static int disable_connecting (void); static int enable_connecting (void); static int disable_ports (void); static int enable_ports (void); - - static sigc::signal PortCountChanged; // emitted when the number of ports changes + + static PBD::Signal1 PortCountChanged; // emitted when the number of ports changes static std::string name_from_state (const XMLNode&); static void set_name_in_state (XMLNode&, const std::string&); @@ -152,11 +152,13 @@ class IO : public SessionObject, public Latent /* we have to defer/order port connection. this is how we do it. */ - static sigc::signal ConnectingLegal; + static PBD::Signal0 ConnectingLegal; static bool connecting_legal; XMLNode *pending_state_node; - + int pending_state_node_version; + bool pending_state_node_in; + /* three utility functions - this just seems to be simplest place to put them */ void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset); @@ -175,37 +177,36 @@ class IO : public SessionObject, public Latent Direction _direction; DataType _default_type; bool _active; - - private: + private: int connecting_became_legal (); - sigc::connection connection_legal_c; + PBD::ScopedConnection connection_legal_c; boost::shared_ptr _bundle; ///< a bundle representing our ports struct UserBundleInfo { - UserBundleInfo (IO*, boost::shared_ptr b); - - boost::shared_ptr bundle; - sigc::connection changed; + UserBundleInfo (IO*, boost::shared_ptr b); + boost::shared_ptr bundle; + PBD::ScopedConnection changed; }; - std::vector _bundles_connected; ///< user bundles connected to our ports + std::vector _bundles_connected; ///< user bundles connected to our ports static int parse_io_string (const std::string&, std::vector& chns); static int parse_gain_string (const std::string&, std::vector& chns); - + int ensure_ports (ChanCount, bool clear, bool lockit, void *src); void check_bundles_connected (); - void check_bundles (std::vector&, const PortSet&); + void check_bundles (std::vector&, const PortSet&); void bundle_changed (Bundle::Change); - - int get_port_counts (const XMLNode& node, ChanCount& n, boost::shared_ptr& c); - int create_ports (const XMLNode&); - int make_connections (const XMLNode&); + int get_port_counts (const XMLNode& node, int version, ChanCount& n, boost::shared_ptr& c); + int get_port_counts_2X (const XMLNode& node, int version, ChanCount& n, boost::shared_ptr& c); + int create_ports (const XMLNode&, int version); + int make_connections (const XMLNode&, int, bool); + int make_connections_2X (const XMLNode &, int, bool); boost::shared_ptr find_possible_bundle (const std::string &desired_name); @@ -214,7 +215,7 @@ class IO : public SessionObject, public Latent std::string build_legal_port_name (DataType type); int32_t find_port_hole (const char* base); - void setup_bundles (); + void setup_bundle (); std::string bundle_channel_name (uint32_t, uint32_t) const; };