summaryrefslogtreecommitdiff
path: root/libs/ardour/audioengine.cc
diff options
context:
space:
mode:
authorGZharun <grygoriiz@wavesglobal.com>2015-06-23 13:15:32 +0300
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:18:15 -0400
commit6584a89c4eb5024fe89a15acd8e4fa4697e606be (patch)
tree14dd37b41ca77540e2da497bb34808c406ea987e /libs/ardour/audioengine.cc
parenta38e67d55bec8a632dc136558f926daa40ce093d (diff)
Fixed incomplete merge for audioengine.cc
[To be reviewed by] Paul Davis
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r--libs/ardour/audioengine.cc41
1 files changed, 22 insertions, 19 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 02c4d1b553..16283d9232 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -468,25 +468,28 @@ AudioEngine::do_reset_backend()
Glib::Threads::RecMutex::Lock pl (_state_lock);
g_atomic_int_dec_and_test (&_hw_reset_request_count);
- std::cout << "AudioEngine::RESET::Reset request processing. Requests left: " << _hw_reset_request_count << std::endl;
- DeviceResetStarted(); // notify about device reset to be started
-
- // backup the device name
- std::string name = _backend->device_name ();
-
- std::cout << "AudioEngine::RESET::Stoping engine..." << std::endl;
- stop();
-
- std::cout << "AudioEngine::RESET::Reseting device..." << std::endl;
- if ( 0 == _backend->reset_device () ) {
-
- std::cout << "AudioEngine::RESET::Starting engine..." << std::endl;
- start ();
-
+ std::cout << "AudioEngine::RESET::Reset request processing. Requests left: " << _hw_reset_request_count << std::endl;
+ DeviceResetStarted(); // notify about device reset to be started
+
+ // backup the device name
+ std::string name = _backend->device_name ();
+
+ std::cout << "AudioEngine::RESET::Reseting device..." << std::endl;
+ if ( ( 0 == stop () ) &&
+ ( 0 == _backend->reset_device () ) &&
+ ( 0 == start () ) ) {
+
+ std::cout << "AudioEngine::RESET::Engine started..." << std::endl;
+
// inform about possible changes
BufferSizeChanged (_backend->buffer_size() );
- } else {
- DeviceError();
+ DeviceResetFinished(); // notify about device reset finish
+
+ } else {
+
+ DeviceResetFinished(); // notify about device reset finish
+ // we've got an error
+ DeviceError();
}
std::cout << "AudioEngine::RESET::Done." << std::endl;
@@ -522,6 +525,8 @@ AudioEngine::do_devicelist_update()
_devicelist_update_lock.unlock();
+ Glib::Threads::RecMutex::Lock pl (_state_lock);
+
g_atomic_int_dec_and_test (&_hw_devicelist_update_count);
DeviceListChanged (); /* EMIT SIGNAL */
@@ -858,8 +863,6 @@ AudioEngine::stop (bool for_latency)
return 0;
}
- Glib::Threads::Mutex::Lock lm (_process_lock);
-
if (_backend->stop ()) {
return -1;
}