Toob ML bug fixes.
This commit is contained in:
+9
-6
@@ -340,15 +340,18 @@ private:
|
||||
portSubscription.samplesToNextCallback += portSubscription.sampleRate;
|
||||
if (!portSubscription.waitingForAck)
|
||||
{
|
||||
portSubscription.waitingForAck = true;
|
||||
float value = realtimeActivePedalBoard->GetControlOutputValue(
|
||||
portSubscription.instanceIndex,
|
||||
portSubscription.portIndex);
|
||||
|
||||
this->realtimeWriter.SendMonitorPortUpdate(
|
||||
portSubscription.callbackPtr,
|
||||
portSubscription.subscriptionHandle,
|
||||
value);
|
||||
if (value != portSubscription.lastValue)
|
||||
{
|
||||
portSubscription.waitingForAck = true;
|
||||
portSubscription.lastValue = value;
|
||||
this->realtimeWriter.SendMonitorPortUpdate(
|
||||
portSubscription.callbackPtr,
|
||||
portSubscription.subscriptionHandle,
|
||||
value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+9
-1
@@ -93,7 +93,15 @@ Lv2Effect::Lv2Effect(
|
||||
|
||||
LV2_Feature **myFeatures = &this->features[0];
|
||||
|
||||
LilvInstance *pInstance = lilv_plugin_instantiate(pPlugin, pHost->GetSampleRate(), myFeatures);
|
||||
LilvInstance *pInstance = nullptr;
|
||||
try {
|
||||
pInstance = lilv_plugin_instantiate(pPlugin, pHost->GetSampleRate(), myFeatures);
|
||||
} catch (const std::exception &e)
|
||||
{
|
||||
this->pInstance = nullptr;
|
||||
throw PiPedalException(SS("Plugin threw an exception: " << e.what()));
|
||||
|
||||
}
|
||||
this->pInstance = pInstance;
|
||||
if (this->pInstance == nullptr)
|
||||
{
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace pipedal
|
||||
int sampleRate = 0;
|
||||
int samplesToNextCallback = 0;
|
||||
bool waitingForAck = false;
|
||||
float lastValue = -1E30;
|
||||
};
|
||||
|
||||
class RealtimeMonitorPortSubscriptions
|
||||
|
||||
Reference in New Issue
Block a user