Clean shutdown, stability
This commit is contained in:
+8
-10
@@ -349,17 +349,14 @@ private:
|
||||
|
||||
virtual void Close()
|
||||
{
|
||||
std::lock_guard guard{mutex};
|
||||
if (!isOpen)
|
||||
return;
|
||||
|
||||
isOpen = false;
|
||||
|
||||
if (realtimeMonitorPortSubscriptions != nullptr)
|
||||
{
|
||||
delete realtimeMonitorPortSubscriptions;
|
||||
realtimeMonitorPortSubscriptions = nullptr;
|
||||
std::lock_guard guard{mutex};
|
||||
if (!isOpen)
|
||||
return;
|
||||
|
||||
isOpen = false;
|
||||
}
|
||||
|
||||
if (active)
|
||||
{
|
||||
audioDriver->Deactivate();
|
||||
@@ -371,6 +368,7 @@ private:
|
||||
|
||||
StopReaderThread();
|
||||
|
||||
|
||||
// release any pdealboards owned by the process thread.
|
||||
this->activePedalboards.resize(0);
|
||||
this->realtimeActivePedalboard = nullptr;
|
||||
@@ -815,7 +813,7 @@ private:
|
||||
virtual void OnAudioTerminated() override
|
||||
{
|
||||
this->active = false;
|
||||
Lv2Log::info("Audio stopped.");
|
||||
Lv2Log::info("Audio thread terminated.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user