summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/ardour/audioengine.h4
-rw-r--r--libs/ardour/audioengine.cc8
2 files changed, 10 insertions, 2 deletions
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h
index d1e3f8a7ef..fcb1226e1a 100644
--- a/libs/ardour/ardour/audioengine.h
+++ b/libs/ardour/ardour/audioengine.h
@@ -99,6 +99,8 @@ class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager
pframes_t samples_since_cycle_start ();
bool get_sync_offset (pframes_t& offset) const;
+ std::string get_last_backend_error () const { return _last_backend_error_string; }
+
int create_process_thread (boost::function<void()> func);
int join_process_threads ();
bool in_process_thread ();
@@ -280,6 +282,8 @@ class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager
bool _started_for_latency;
bool _in_destructor;
+ std::string _last_backend_error_string;
+
Glib::Threads::Thread* _hw_reset_event_thread;
gint _hw_reset_request_count;
Glib::Threads::Cond _hw_reset_condition;
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 8091e2516c..c5e2f17d47 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -835,8 +835,12 @@ AudioEngine::start (bool for_latency)
_processed_frames = 0;
last_monitor_check = 0;
-
- if (_backend->start (for_latency)) {
+
+ int error_code = _backend->start (for_latency);
+
+ if (error_code != 0) {
+ _last_backend_error_string =
+ AudioBackend::get_error_string((AudioBackend::ErrorCode)error_code);
return -1;
}