Merge pull request #709 from jpcima/fix-vst-crash
Add and remove timers only when a frame is active
This commit is contained in:
commit
d505d70433
1 changed files with 6 additions and 5 deletions
|
|
@ -245,11 +245,6 @@ Editor::Editor(EditorController& ctrl)
|
||||||
ctrl.decorate(&impl);
|
ctrl.decorate(&impl);
|
||||||
|
|
||||||
impl.createFrameContents();
|
impl.createFrameContents();
|
||||||
|
|
||||||
uint32_t oscSendInterval = 1; // milliseconds
|
|
||||||
impl.oscSendQueueTimer_ = makeOwned<CVSTGUITimer>(
|
|
||||||
[this](CVSTGUITimer* timer) { impl_->tickOSCQueue(timer); },
|
|
||||||
oscSendInterval, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Editor::~Editor()
|
Editor::~Editor()
|
||||||
|
|
@ -275,6 +270,11 @@ void Editor::open(CFrame& frame)
|
||||||
impl_->sendQueuedOSC("/mem/buffers", "", nullptr);
|
impl_->sendQueuedOSC("/mem/buffers", "", nullptr);
|
||||||
}, 1000, true);
|
}, 1000, true);
|
||||||
|
|
||||||
|
uint32_t oscSendInterval = 1; // milliseconds
|
||||||
|
impl.oscSendQueueTimer_ = makeOwned<CVSTGUITimer>(
|
||||||
|
[this](CVSTGUITimer* timer) { impl_->tickOSCQueue(timer); },
|
||||||
|
oscSendInterval, false);
|
||||||
|
|
||||||
// request the whole Key and CC information
|
// request the whole Key and CC information
|
||||||
impl.sendQueuedOSC("/key/slots", "", nullptr);
|
impl.sendQueuedOSC("/key/slots", "", nullptr);
|
||||||
impl.sendQueuedOSC("/sw/last/slots", "", nullptr);
|
impl.sendQueuedOSC("/sw/last/slots", "", nullptr);
|
||||||
|
|
@ -286,6 +286,7 @@ void Editor::close()
|
||||||
Impl& impl = *impl_;
|
Impl& impl = *impl_;
|
||||||
|
|
||||||
impl.clearQueuedOSC();
|
impl.clearQueuedOSC();
|
||||||
|
impl.oscSendQueueTimer_ = nullptr;
|
||||||
|
|
||||||
impl.memQueryTimer_ = nullptr;
|
impl.memQueryTimer_ = nullptr;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue