diff --git a/c++/carla-backend/vst.cpp b/c++/carla-backend/vst.cpp index 7cc8399..e613258 100644 --- a/c++/carla-backend/vst.cpp +++ b/c++/carla-backend/vst.cpp @@ -1424,7 +1424,7 @@ public: void handleAudioMasterAutomate(const uint32_t index, const double value) { //CARLA_ASSERT(m_enabled); - //CARLA_ASSERT(index < param.count); + CARLA_ASSERT(index < param.count); if (index >= param.count /*|| ! m_enabled*/) return; diff --git a/c++/carla-bridge/carla_bridge_plugin.cpp b/c++/carla-bridge/carla_bridge_plugin.cpp index 46b6d7b..e7c0fe6 100644 --- a/c++/carla-bridge/carla_bridge_plugin.cpp +++ b/c++/carla-bridge/carla_bridge_plugin.cpp @@ -509,10 +509,27 @@ public: if (! plugin) return; - nextChunkFilePath = QString(filePath); + QString chunkFilePath(filePath); - while (! nextChunkFilePath.isEmpty()) - carla_msleep(25); +#ifdef Q_OS_WIN + if (chunkFilePath.startsWith("/")) + { + // running under Wine, posix host + chunkFilePath = chunkFilePath.replace(0, 1, "Z:/"); + chunkFilePath = QDir::toNativeSeparators(chunkFilePath); + } +#endif + QFile chunkFile(chunkFilePath); + + if (plugin && chunkFile.open(QIODevice::ReadOnly | QIODevice::Text)) + { + QTextStream in(&chunkFile); + QString stringData(in.readAll()); + chunkFile.close(); + chunkFile.remove(); + + plugin->setChunkData(stringData.toUtf8().constData()); + } } // --------------------------------------------------------------------- @@ -618,31 +635,6 @@ protected: if (event->timerId() == msgTimer) { - if (! nextChunkFilePath.isEmpty()) - { -#ifdef Q_OS_WIN - if (nextChunkFilePath.startsWith("/")) - { - // running under Wine, posix host - nextChunkFilePath = nextChunkFilePath.replace(0, 1, "Z:/"); - nextChunkFilePath = QDir::toNativeSeparators(nextChunkFilePath); - } -#endif - QFile chunkFile(nextChunkFilePath); - - if (plugin && chunkFile.open(QIODevice::ReadOnly | QIODevice::Text)) - { - QTextStream in(&chunkFile); - QString stringData(in.readAll()); - chunkFile.close(); - chunkFile.remove(); - - plugin->setChunkData(stringData.toUtf8().constData()); - } - - nextChunkFilePath.clear(); - } - if (nextWidth > 0 && nextHeight > 0 && pluginGui) { pluginGui->setNewSize(nextWidth, nextHeight); @@ -670,7 +662,6 @@ private: bool hasUI; int msgTimer; int nextWidth, nextHeight; - QString nextChunkFilePath; CarlaBackend::CarlaEngine* engine; CarlaBackend::CarlaPlugin* plugin;