summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-11-28 15:24:47 +0100
committerRobin Gareus <robin@gareus.org>2018-11-28 15:24:47 +0100
commit81857a947c106586e2a90c46cb8f69cdd3ad600d (patch)
tree43deb2a936b2ffaa9cc05f608a50731772270c11 /libs/ardour
parentdf28a71252f4593c65ec03611586dfc8a62a834f (diff)
Consolidate ambiguous engine API calls
available(), connected(), running() were ill-defined and used interchangeably.
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/port.cc6
-rw-r--r--libs/ardour/route.cc10
-rw-r--r--libs/ardour/session.cc4
-rw-r--r--libs/ardour/session_export.cc2
-rw-r--r--libs/ardour/session_transport.cc2
5 files changed, 12 insertions, 12 deletions
diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc
index 3c31094dae..eb7ca913d2 100644
--- a/libs/ardour/port.cc
+++ b/libs/ardour/port.cc
@@ -72,7 +72,7 @@ Port::Port (std::string const & n, DataType t, PortFlags f)
assert (_name.find_first_of (':') == std::string::npos);
- if (!port_engine.available ()) {
+ if (!port_manager->running ()) {
DEBUG_TRACE (DEBUG::Ports, string_compose ("port-engine n/a postpone registering %1\n", name()));
_port_handle = 0; // created during ::reestablish() later
} else if ((_port_handle = port_engine.register_port (_name, t, _flags)) == 0) {
@@ -205,7 +205,7 @@ Port::connected_to (std::string const & o) const
return false;
}
- if (!port_engine.available()) {
+ if (!port_manager->running()) {
return false;
}
@@ -215,7 +215,7 @@ Port::connected_to (std::string const & o) const
int
Port::get_connections (std::vector<std::string> & c) const
{
- if (!port_engine.available()) {
+ if (!port_manager->running()) {
c.insert (c.end(), _connections.begin(), _connections.end());
return c.size();
}
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index a05ccbe903..9a2559e240 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -1286,7 +1286,7 @@ Route::ab_plugins (bool forward)
void
Route::clear_processors (Placement p)
{
- if (!_session.engine().connected()) {
+ if (!_session.engine().running()) {
return;
}
@@ -1391,7 +1391,7 @@ Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStream
return 0;
}
- if (!_session.engine().connected()) {
+ if (!_session.engine().running()) {
return 1;
}
@@ -1507,7 +1507,7 @@ Route::replace_processor (boost::shared_ptr<Processor> old, boost::shared_ptr<Pr
return 1;
}
- if (!AudioEngine::instance()->connected() || !old || !sub) {
+ if (!AudioEngine::instance()->running() || !old || !sub) {
return 1;
}
@@ -1588,7 +1588,7 @@ Route::remove_processors (const ProcessorList& to_be_deleted, ProcessorStreams*
{
ProcessorList deleted;
- if (!_session.engine().connected()) {
+ if (!_session.engine().running()) {
return 1;
}
@@ -3283,7 +3283,7 @@ Route::remove_aux_or_listen (boost::shared_ptr<Route> route)
/* list could have been demolished while we dropped the lock
so start over.
*/
- if (_session.engine().connected()) {
+ if (_session.engine().running()) {
/* i/o processors cannot be removed if the engine is not running
* so don't live-loop in case the engine is N/A or dies
*/
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 6fd6a9474c..1a33adc7d1 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -6931,7 +6931,7 @@ Session::set_worst_output_latency ()
_worst_output_latency = 0;
- if (!_engine.connected()) {
+ if (!_engine.running()) {
return;
}
@@ -6955,7 +6955,7 @@ Session::set_worst_input_latency ()
_worst_input_latency = 0;
- if (!_engine.connected()) {
+ if (!_engine.running()) {
return;
}
diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc
index 879f34020a..37bdbebe5d 100644
--- a/libs/ardour/session_export.cc
+++ b/libs/ardour/session_export.cc
@@ -172,7 +172,7 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex
/* we are ready to go ... */
- if (!_engine.connected()) {
+ if (!_engine.running()) {
return -1;
}
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 99ce3e46ed..cc46cffad9 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -925,7 +925,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
because there will be no process callbacks to deliver stuff from
*/
- if (_engine.connected() && !_engine.freewheeling()) {
+ if (_engine.running() && !_engine.freewheeling()) {
// need to queue this in the next RT cycle
_send_timecode_update = true;