Browse Source

VST2: Fix creation of a rack when one of the parameters is a NaN

On some quirky Windows VST2 (old SWAM instruments) or old Linux ones (InsertPizHere plugins), a NaN parameter value would be sent.
This throws an error in the frontend code and prevent carla from creating the corresponding rack.
We workaround that by just returning early from PixmapDialsetValue() if the value is a NaN

Fixes #1143
tags/v2.2.0-RC1
Térence Clastres Filipe Coelho <falktx@falktx.com> 4 years ago
parent
commit
1f0238411f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      source/frontend/widgets/pixmapdial.py

+ 2
- 2
source/frontend/widgets/pixmapdial.py View File

@@ -19,7 +19,7 @@
# ------------------------------------------------------------------------------------------------------------
# Imports (Global)

from math import cos, floor, pi, sin
from math import cos, floor, pi, sin, isnan

from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QEvent, QPointF, QRectF, QTimer, QSize
from PyQt5.QtGui import QColor, QConicalGradient, QFont, QFontMetrics
@@ -241,7 +241,7 @@ class PixmapDial(QDial):
self.fMaximum = value

def setValue(self, value, emitSignal=False):
if self.fRealValue == value:
if self.fRealValue == value or isnan(value):
return

if value <= self.fMinimum:


Loading…
Cancel
Save