mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-29 08:23:01 +01:00
[Summary] Improved backend workflow, added synchronization for cases when device reset happens on device parameter change
This commit is contained in:
parent
295f361f5e
commit
91fcacd150
12 changed files with 348 additions and 299 deletions
|
|
@ -344,6 +344,28 @@ WTErr WCMRAudioDevice::SetStreaming (bool newState)
|
|||
return (eNoErr);
|
||||
}
|
||||
|
||||
|
||||
WTErr WCMRAudioDevice::ResetDevice ()
|
||||
{
|
||||
// Keep device sates
|
||||
bool wasStreaming = Streaming();
|
||||
bool wasActive = Active();
|
||||
|
||||
WTErr err = SetStreaming(false);
|
||||
|
||||
if (err == eNoErr)
|
||||
SetActive(false);
|
||||
|
||||
if (err == eNoErr && wasActive)
|
||||
SetActive(true);
|
||||
|
||||
if (err == eNoErr && wasStreaming)
|
||||
SetStreaming(true);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// IsProcessActive - returns true if process code is running.
|
||||
// A normal audio device should return the Streaming() value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue