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.cc26
1 files changed, 22 insertions, 4 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 886bb4a61f..9f7d67fb6d 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -899,6 +899,25 @@ AudioEngine::halted (void *arg)
}
}
+bool
+AudioEngine::can_request_hardware_monitoring ()
+{
+ const char ** ports;
+
+ if (!_jack) {
+ return 0;
+ }
+
+ if ((ports = jack_get_ports (_jack, NULL, JACK_DEFAULT_AUDIO_TYPE, JackPortCanMonitor)) == 0) {
+ return false;
+ }
+
+ free (ports);
+
+ return true;
+}
+
+
uint32_t
AudioEngine::n_physical_outputs () const
{
@@ -913,10 +932,9 @@ AudioEngine::n_physical_outputs () const
return 0;
}
- if (ports) {
- for (i = 0; ports[i]; ++i);
- free (ports);
- }
+ for (i = 0; ports[i]; ++i);
+ free (ports);
+
return i;
}