summaryrefslogtreecommitdiff
path: root/libs/ardour/audioengine.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r--libs/ardour/audioengine.cc30
1 files changed, 29 insertions, 1 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index ffa55e453d..6067da55b7 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -1010,7 +1010,7 @@ AudioEngine::get_port_by_name (const string& portname)
}
}
- return 0;
+ return 0;
}
const char **
@@ -1484,3 +1484,31 @@ AudioEngine::_start_process_thread (void* arg)
return 0;
}
+
+bool
+AudioEngine::port_is_physical (const std::string& portname) const
+{
+ GET_PRIVATE_JACK_POINTER_RET(_jack, false);
+
+ jack_port_t *port = jack_port_by_name (_priv_jack, portname.c_str());
+
+ if (!port) {
+ return false;
+ }
+
+ return jack_port_flags (port) & JackPortIsPhysical;
+}
+
+void
+AudioEngine::ensure_monitor_input (const std::string& portname, bool yn) const
+{
+ GET_PRIVATE_JACK_POINTER(_jack);
+
+ jack_port_t *port = jack_port_by_name (_priv_jack, portname.c_str());
+
+ if (!port) {
+ return;
+ }
+
+ jack_port_request_monitor (port, yn);
+}