Consolidate ambiguous engine API calls
available(), connected(), running() were ill-defined and used interchangeably.
This commit is contained in:
parent
df28a71252
commit
81857a947c
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user