AudioEngine tweaks from Tracks, related to stopping audioengine and halting

This commit is contained in:
Paul Davis 2015-05-13 11:01:37 -04:00
parent 289078f7f8
commit 2911bb9fb8

View File

@ -770,7 +770,7 @@ void
AudioEngine::drop_backend ()
{
if (_backend) {
stop(false);
_backend->stop ();
_backend->drop_device ();
_backend.reset ();
_running = false;
@ -858,18 +858,20 @@ AudioEngine::stop (bool for_latency)
return 0;
}
if (_session && _running) {
// it's not a halt, but should be handled the same way:
// disable record, stop transport and I/O processign but save the data.
_session->engine_halted ();
}
Glib::Threads::Mutex::Lock lm (_process_lock);
if (_backend->stop ()) {
return -1;
}
if (_session && _running &&
(_session->state_of_the_state() & Session::Loading) == 0 &&
(_session->state_of_the_state() & Session::Deletion) == 0) {
// it's not a halt, but should be handled the same way:
// disable record, stop transport and I/O processign but save the data.
_session->engine_halted ();
}
_running = false;
_processed_frames = 0;
_measuring_latency = MeasureNone;