Browse Source

Fix BigMeter plugin for dpm changes

tags/1.9.6
falkTX 9 years ago
parent
commit
602214a8bf
2 changed files with 14 additions and 9 deletions
  1. +5
    -3
      source/native-plugins/bigmeter.cpp
  2. +9
    -6
      source/native-plugins/resources/bigmeter-ui

+ 5
- 3
source/native-plugins/bigmeter.cpp View File

@@ -51,7 +51,7 @@ protected:
CARLA_SAFE_ASSERT_RETURN(index < 4, nullptr); CARLA_SAFE_ASSERT_RETURN(index < 4, nullptr);


static NativeParameter param; static NativeParameter param;
static NativeParameterScalePoint scalePoints[2];
static NativeParameterScalePoint scalePoints[3];


int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE; int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE;


@@ -86,12 +86,14 @@ protected:
param.name = "Style"; param.name = "Style";
param.ranges.def = 1.0f; param.ranges.def = 1.0f;
param.ranges.min = 1.0f; param.ranges.min = 1.0f;
param.ranges.max = 2.0f;
param.ranges.max = 3.0f;
scalePoints[0].value = 1.0f; scalePoints[0].value = 1.0f;
scalePoints[0].label = "Default"; scalePoints[0].label = "Default";
scalePoints[1].value = 2.0f; scalePoints[1].value = 2.0f;
scalePoints[1].label = "OpenAV"; scalePoints[1].label = "OpenAV";
param.scalePointCount = 2;
scalePoints[2].value = 3.0f;
scalePoints[2].label = "RNCBC";
param.scalePointCount = 3;
param.scalePoints = scalePoints; param.scalePoints = scalePoints;
break; break;
case 2: case 2:


+ 9
- 6
source/native-plugins/resources/bigmeter-ui View File

@@ -52,9 +52,9 @@ class DistrhoUIBigMeter(ExternalUI, DigitalPeakMeter):


channels = 2 #6 if argv[0].endswith("bigmeterM-ui") else 2 channels = 2 #6 if argv[0].endswith("bigmeterM-ui") else 2


self.setChannels(channels)
self.setColor(self.GREEN)
self.setOrientation(self.VERTICAL)
self.setChannelCount(channels)
self.setMeterColor(self.COLOR_GREEN)
self.setMeterOrientation(self.VERTICAL)


#self.setSmoothRelease(0) # till 5 #self.setSmoothRelease(0) # till 5


@@ -72,15 +72,18 @@ class DistrhoUIBigMeter(ExternalUI, DigitalPeakMeter):
if index == 0: if index == 0:
color = int(value) color = int(value)


if color not in (DigitalPeakMeter.GREEN, DigitalPeakMeter.BLUE):
if color not in (DigitalPeakMeter.COLOR_GREEN,
DigitalPeakMeter.COLOR_BLUE):
return return


self.setColor(color)
self.setMeterColor(color)


elif index == 1: elif index == 1:
style = int(value) style = int(value)


if style not in (DigitalPeakMeter.STYLE_DEFAULT, DigitalPeakMeter.STYLE_OPENAV):
if style not in (DigitalPeakMeter.STYLE_DEFAULT,
DigitalPeakMeter.STYLE_OPENAV,
DigitalPeakMeter.STYLE_RNCBC):
return return


self.setMeterStyle(style) self.setMeterStyle(style)


Loading…
Cancel
Save