From d85ab8af89b1efd47622fb04a5d8407416c9db19 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 26 Sep 2015 17:14:43 +1000 Subject: Reinterpret the return value of AudioBackend::start as AudioBackend::ErrorCode This will allow backends to return a more meaningful error message. Eventually an error code could be returned by AudioEngine::start and the GUI can then use AudioBackend::get_error_string to convert the error into a translated error message directly, or it may be desirable to define its own error messages. The reasons for not doing that right now is that this is a workable solution with the least change required. --- libs/ardour/ardour/audioengine.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libs/ardour/ardour/audioengine.h') 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 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; -- cgit v1.2.3