| @@ -260,6 +260,8 @@ public: | |||||
| lastTimePosPlaying = false; | lastTimePosPlaying = false; | ||||
| lastTimePosFrame = 0; | lastTimePosFrame = 0; | ||||
| needsMidiConnectHack = false; | |||||
| for (uint32_t i=0; i < CARLA_URI_MAP_ID_COUNT; i++) | for (uint32_t i=0; i < CARLA_URI_MAP_ID_COUNT; i++) | ||||
| customURIDs.push_back(nullptr); | customURIDs.push_back(nullptr); | ||||
| @@ -2574,6 +2576,20 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| // HACK: rncbc's plugins require midi connect_port before each run() | |||||
| if (needsMidiConnectHack) | |||||
| { | |||||
| for (i=0; i < evIn.count; i++) | |||||
| { | |||||
| if (evIn.data[i].type & CARLA_EVENT_DATA_ATOM) | |||||
| descriptor->connect_port(handle, evIn.data[i].rindex, evIn.data[i].atom); | |||||
| else if (evIn.data[i].type & CARLA_EVENT_DATA_EVENT) | |||||
| descriptor->connect_port(handle, evIn.data[i].rindex, evIn.data[i].event); | |||||
| else if (evIn.data[i].type & CARLA_EVENT_DATA_MIDI_LL) | |||||
| descriptor->connect_port(handle, evIn.data[i].rindex, evIn.data[i].midi); | |||||
| } | |||||
| } | |||||
| for (i=0; i < aIn.count; i++) | for (i=0; i < aIn.count; i++) | ||||
| { | { | ||||
| if (i == 0 || ! h2) descriptor->connect_port(handle, aIn.rindexes[i], inBuffer[i]); | if (i == 0 || ! h2) descriptor->connect_port(handle, aIn.rindexes[i], inBuffer[i]); | ||||
| @@ -4144,6 +4160,10 @@ public: | |||||
| return false; | return false; | ||||
| } | } | ||||
| // HACK: rncbc's plugins require midi connect_port before each run() | |||||
| if (strcmp(rdf_descriptor->Author, "rncbc aka. Rui Nuno Capela") == 0) | |||||
| needsMidiConnectHack = true; | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // get info | // get info | ||||
| @@ -4562,6 +4582,9 @@ private: | |||||
| bool lastTimePosPlaying; | bool lastTimePosPlaying; | ||||
| uint32_t lastTimePosFrame; | uint32_t lastTimePosFrame; | ||||
| // HACK: rncbc's plugins require midi connect_port before each run() | |||||
| bool needsMidiConnectHack; | |||||
| static unsigned int m_count; | static unsigned int m_count; | ||||
| static std::set<const LV2_Lib_Descriptor*> libDescs; | static std::set<const LV2_Lib_Descriptor*> libDescs; | ||||