summaryrefslogtreecommitdiff
path: root/libs/ardour/io.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r--libs/ardour/io.cc26
1 files changed, 10 insertions, 16 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index dbe7b3c526..89b3b9e89f 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -155,7 +155,7 @@ IO::IO (Session& s, const string& name,
_session.add_controllable (_gain_control);
- create_bundles_for_inputs_and_outputs ();
+ setup_bundles_for_inputs_and_outputs ();
}
IO::IO (Session& s, const XMLNode& node, DataType dt)
@@ -194,7 +194,7 @@ IO::IO (Session& s, const XMLNode& node, DataType dt)
_session.add_controllable (_gain_control);
- create_bundles_for_inputs_and_outputs ();
+ setup_bundles_for_inputs_and_outputs ();
}
IO::~IO ()
@@ -2586,7 +2586,7 @@ IO::update_port_total_latencies ()
/**
- * Setup bundles that describe our inputs and outputs.
+ * Setup bundles that describe our inputs and outputs. Also creates bundles if necessary.
*/
void
@@ -2594,6 +2594,13 @@ IO::setup_bundles_for_inputs_and_outputs ()
{
char buf[32];
+ if (!_bundle_for_inputs) {
+ _bundle_for_inputs.reset (new Bundle (true));
+ }
+ if (!_bundle_for_outputs) {
+ _bundle_for_outputs.reset (new Bundle (false));
+ }
+
_bundle_for_inputs->remove_channels ();
_bundle_for_outputs->remove_channels ();
@@ -2614,19 +2621,6 @@ IO::setup_bundles_for_inputs_and_outputs ()
}
}
-
-/**
- * Create and setup bundles that describe our inputs and outputs.
- */
-
-void
-IO::create_bundles_for_inputs_and_outputs ()
-{
- _bundle_for_inputs = boost::shared_ptr<Bundle> (new Bundle (true));
- _bundle_for_outputs = boost::shared_ptr<Bundle> (new Bundle (false));
- setup_bundles_for_inputs_and_outputs ();
-}
-
/** @return Bundles connected to our inputs */
BundleList
IO::bundles_connected_to_inputs ()