| @@ -222,7 +222,9 @@ public: | |||||
| hasUI = false; | hasUI = false; | ||||
| msgTimer = 0; | |||||
| msgTimerGUI = 0; | |||||
| msgTimerOSC = 0; | |||||
| nextWidth = 0; | nextWidth = 0; | ||||
| nextHeight = 0; | nextHeight = 0; | ||||
| @@ -236,7 +238,8 @@ public: | |||||
| ~BridgePluginClient() | ~BridgePluginClient() | ||||
| { | { | ||||
| qDebug("BridgePluginClient::~BridgePluginClient()"); | qDebug("BridgePluginClient::~BridgePluginClient()"); | ||||
| CARLA_ASSERT(msgTimer == 0); | |||||
| CARLA_ASSERT(msgTimerGUI == 0); | |||||
| CARLA_ASSERT(msgTimerOSC == 0); | |||||
| CARLA_ASSERT(! pluginGui); | CARLA_ASSERT(! pluginGui); | ||||
| } | } | ||||
| @@ -277,7 +280,8 @@ public: | |||||
| QApplication::setQuitOnLastWindowClosed(false); | QApplication::setQuitOnLastWindowClosed(false); | ||||
| } | } | ||||
| msgTimer = startTimer(50); | |||||
| msgTimerGUI = startTimer(50); | |||||
| msgTimerOSC = startTimer(25); | |||||
| QApplication::exec(); | QApplication::exec(); | ||||
| } | } | ||||
| @@ -286,10 +290,16 @@ public: | |||||
| { | { | ||||
| qDebug("BridgePluginClient::quit()"); | qDebug("BridgePluginClient::quit()"); | ||||
| if (msgTimer != 0) | |||||
| if (msgTimerGUI != 0) | |||||
| { | |||||
| QApplication::killTimer(msgTimerGUI); | |||||
| msgTimerGUI = 0; | |||||
| } | |||||
| if (msgTimerOSC != 0) | |||||
| { | { | ||||
| QApplication::killTimer(msgTimer); | |||||
| msgTimer = 0; | |||||
| QApplication::killTimer(msgTimerOSC); | |||||
| msgTimerOSC = 0; | |||||
| } | } | ||||
| if (pluginGui) | if (pluginGui) | ||||
| @@ -633,7 +643,7 @@ protected: | |||||
| if (qCloseNow) | if (qCloseNow) | ||||
| return quit(); | return quit(); | ||||
| if (event->timerId() == msgTimer) | |||||
| if (event->timerId() == msgTimerGUI) | |||||
| { | { | ||||
| if (nextWidth > 0 && nextHeight > 0 && pluginGui) | if (nextWidth > 0 && nextHeight > 0 && pluginGui) | ||||
| { | { | ||||
| @@ -644,11 +654,13 @@ protected: | |||||
| if (plugin) | if (plugin) | ||||
| plugin->idleGui(); | plugin->idleGui(); | ||||
| } | |||||
| else if (event->timerId() == msgTimerOSC) | |||||
| { | |||||
| if (! CarlaClient::oscIdle()) | if (! CarlaClient::oscIdle()) | ||||
| { | { | ||||
| CARLA_ASSERT(msgTimer == 0); | |||||
| msgTimer = 0; | |||||
| CARLA_ASSERT(msgTimerOSC == 0); | |||||
| msgTimerOSC = 0; | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| @@ -660,7 +672,7 @@ protected: | |||||
| private: | private: | ||||
| bool hasUI; | bool hasUI; | ||||
| int msgTimer; | |||||
| int msgTimerGUI, msgTimerOSC; | |||||
| int nextWidth, nextHeight; | int nextWidth, nextHeight; | ||||
| CarlaBackend::CarlaEngine* engine; | CarlaBackend::CarlaEngine* engine; | ||||