diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-07-17 13:59:46 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-07-17 13:59:46 +0000 |
commit | b621b28fce4942fb4505854482cddec1545f5c0f (patch) | |
tree | 8e4895d32b519a666adaa9950fb6d7e905ffa2c3 /libs/ardour | |
parent | c677de4816f86c11feb8cf92bbe75af28437d5ac (diff) |
make it possible to (and actually do) name insert and send ports as "return" and "send" rather than "in" and "out" (#5012)
git-svn-id: svn://localhost/ardour2/branches/3.0@13052 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/io.h | 5 | ||||
-rw-r--r-- | libs/ardour/ardour/io_processor.h | 8 | ||||
-rw-r--r-- | libs/ardour/delivery.cc | 2 | ||||
-rw-r--r-- | libs/ardour/io.cc | 20 | ||||
-rw-r--r-- | libs/ardour/io_processor.cc | 6 | ||||
-rw-r--r-- | libs/ardour/port_insert.cc | 2 |
6 files changed, 27 insertions, 16 deletions
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index 1ba27a7449..d38aa88576 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -74,8 +74,8 @@ class IO : public SessionObject, public Latent Output }; - IO (Session&, const std::string& name, Direction, DataType default_type = DataType::AUDIO); - IO (Session&, const XMLNode&, DataType default_type = DataType::AUDIO); + IO (Session&, const std::string& name, Direction, DataType default_type = DataType::AUDIO, bool sendish = false); + IO (Session&, const XMLNode&, DataType default_type = DataType::AUDIO, bool sendish = false); virtual ~IO(); @@ -207,6 +207,7 @@ class IO : public SessionObject, public Latent Direction _direction; DataType _default_type; bool _active; + bool _sendish; private: int connecting_became_legal (); diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index 574cef9993..3d59230b26 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -44,10 +44,10 @@ class IOProcessor : public Processor { public: IOProcessor (Session&, bool with_input, bool with_output, - const std::string& proc_name, const std::string io_name="", - ARDOUR::DataType default_type = DataType::AUDIO); - IOProcessor (Session&, boost::shared_ptr<IO> input, boost::shared_ptr<IO> output, - const std::string& proc_name, ARDOUR::DataType default_type = DataType::AUDIO); + const std::string& proc_name, const std::string io_name="", + ARDOUR::DataType default_type = DataType::AUDIO, bool sendish=false); + IOProcessor (Session&, boost::shared_ptr<IO> input, boost::shared_ptr<IO> output, + const std::string& proc_name, ARDOUR::DataType default_type = DataType::AUDIO); virtual ~IOProcessor (); bool set_name (const std::string& str); diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index b58e7b4471..126b599299 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -71,7 +71,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Pann /* deliver to a new IO object */ Delivery::Delivery (Session& s, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster> mm, const string& name, Role r) - : IOProcessor(s, false, (role_requires_output_ports (r) ? true : false), name) + : IOProcessor(s, false, (role_requires_output_ports (r) ? true : false), name, "", DataType::AUDIO, (r == Send)) , _role (r) , _output_buffers (new BufferSet()) , _current_gain (1.0) diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index da79301a31..01a4a64a38 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -58,10 +58,11 @@ PBD::Signal1<void,ChanCount> IO::PortCountChanged; /** @param default_type The type of port that will be created by ensure_io * and friends if no type is explicitly requested (to avoid breakage). */ -IO::IO (Session& s, const string& name, Direction dir, DataType default_type) +IO::IO (Session& s, const string& name, Direction dir, DataType default_type, bool sendish) : SessionObject (s, name) , _direction (dir) , _default_type (default_type) + , _sendish (sendish) { _active = true; Port::PostDisconnect.connect_same_thread (*this, boost::bind (&IO::disconnect_check, this, _1, _2)); @@ -69,10 +70,11 @@ IO::IO (Session& s, const string& name, Direction dir, DataType default_type) setup_bundle (); } -IO::IO (Session& s, const XMLNode& node, DataType dt) +IO::IO (Session& s, const XMLNode& node, DataType dt, bool sendish) : SessionObject(s, "unnamed io") , _direction (Input) , _default_type (dt) + , _sendish (sendish) { _active = true; pending_state_node = 0; @@ -1347,10 +1349,18 @@ IO::build_legal_port_name (DataType type) use the (new) translated name. */ - if (_direction == Input) { - suffix += X_("_in"); + if (_sendish) { + if (_direction == Input) { + suffix += X_("_return"); + } else { + suffix += X_("_send"); + } } else { - suffix += X_("_out"); + if (_direction == Input) { + suffix += X_("_in"); + } else { + suffix += X_("_out"); + } } // allow up to 4 digits for the output port number, plus the slash, suffix and extra space diff --git a/libs/ardour/io_processor.cc b/libs/ardour/io_processor.cc index fd47e1c06c..d23afce612 100644 --- a/libs/ardour/io_processor.cc +++ b/libs/ardour/io_processor.cc @@ -43,7 +43,7 @@ namespace ARDOUR { class Session; } /* create an IOProcessor that proxies to a new IO object */ IOProcessor::IOProcessor (Session& s, bool with_input, bool with_output, - const string& proc_name, const string io_name, DataType dtype) + const string& proc_name, const string io_name, DataType dtype, bool sendish) : Processor(s, proc_name) { /* these are true in this constructor whether we actually create the associated @@ -54,11 +54,11 @@ IOProcessor::IOProcessor (Session& s, bool with_input, bool with_output, _own_output = true; if (with_input) { - _input.reset (new IO(s, io_name.empty() ? proc_name : io_name, IO::Input, dtype)); + _input.reset (new IO(s, io_name.empty() ? proc_name : io_name, IO::Input, dtype, sendish)); } if (with_output) { - _output.reset (new IO(s, io_name.empty() ? proc_name : io_name, IO::Output, dtype)); + _output.reset (new IO(s, io_name.empty() ? proc_name : io_name, IO::Output, dtype, sendish)); } } diff --git a/libs/ardour/port_insert.cc b/libs/ardour/port_insert.cc index aa2d1392f5..b726b14aa5 100644 --- a/libs/ardour/port_insert.cc +++ b/libs/ardour/port_insert.cc @@ -44,7 +44,7 @@ PortInsert::name_and_id_new_insert (Session& s, uint32_t& bitslot) } PortInsert::PortInsert (Session& s, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster> mm) - : IOProcessor (s, true, true, name_and_id_new_insert (s, _bitslot), "") + : IOProcessor (s, true, true, name_and_id_new_insert (s, _bitslot), "", DataType::AUDIO, true) , _out (new Delivery (s, _output, pannable, mm, _name, Delivery::Insert)) { _mtdm = 0; |