summaryrefslogtreecommitdiff
path: root/libs/ardour/audioengine.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-10-03 11:22:58 +1000
committerTim Mayberry <mojofunk@gmail.com>2015-10-06 13:29:57 +1000
commit3eb4b43fa666c480b96a6f2dccc9bd766bcaa5e9 (patch)
tree02804a3cae327c3368b42c3d54a8512215a555c0 /libs/ardour/audioengine.cc
parent5ed05218e6280e81c46e9deea8217143ee551f93 (diff)
Initialize AudioEngine::last_backend_error() to the default error string
Currently the last backend error string is only set when calling AudioBackend::start. Errors that occur when calling other AudioBackend methods like AudioBackend::set_buffer_size do not set the last backend error string. So until all the required AudioBackend methods return an ErrorCode and last_backend_error() can be removed just set it to a default string. Until all errors that occur are correctly indicated by returning an error code there will still be situations where last_backend_error() is not indicative of the true error. For instance AudioEngine::start is called and it fails but returns a valid error code so last_backend_error() is set, then some other engine/backend method is called that fails and as last_backend_error is not set the GUI will display the incorrect error message.
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r--libs/ardour/audioengine.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 3d0cfca523..69db73a6b7 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -87,6 +87,7 @@ AudioEngine::AudioEngine ()
, _stopped_for_latency (false)
, _started_for_latency (false)
, _in_destructor (false)
+ , _last_backend_error_string(AudioBackend::get_error_string((AudioBackend::ErrorCode)-1))
, _hw_reset_event_thread(0)
, _hw_reset_request_count(0)
, _stop_hw_reset_processing(0)