#include "ardour/audioengine.h"
#include "ardour/buffer.h"
+#include "ardour/buffer_set.h"
#include "ardour/debug.h"
#include "ardour/io.h"
-#include "ardour/route.h"
#include "ardour/port.h"
-#include "ardour/audio_port.h"
-#include "ardour/midi_port.h"
+#include "ardour/route.h"
#include "ardour/session.h"
-#include "ardour/cycle_timer.h"
-#include "ardour/buffer_set.h"
-#include "ardour/meter.h"
-#include "ardour/amp.h"
#include "ardour/user_bundle.h"
#include "i18n.h"
/** @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));
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;
ChanCount after = before;
after.set (port->type(), after.get (port->type()) - 1);
- bool const r = PortCountChanging (after); /* EMIT SIGNAL */
- if (r) {
+ boost::optional<bool> const r = PortCountChanging (after); /* EMIT SIGNAL */
+ if (r.get_value_or (false)) {
return -1;
}
return -1;
}
- cerr << "IO::set state, connecting legal ? " << connecting_legal << endl;
-
if (connecting_legal) {
if (make_connections (node, version, false)) {
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