From 602214a8bf494f0f533137a7127753e15fdd5c3e Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 12 Jan 2015 20:38:28 +0000 Subject: [PATCH] Fix BigMeter plugin for dpm changes --- source/native-plugins/bigmeter.cpp | 8 +++++--- source/native-plugins/resources/bigmeter-ui | 15 +++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/source/native-plugins/bigmeter.cpp b/source/native-plugins/bigmeter.cpp index 4077e370b..77c24157d 100644 --- a/source/native-plugins/bigmeter.cpp +++ b/source/native-plugins/bigmeter.cpp @@ -51,7 +51,7 @@ protected: CARLA_SAFE_ASSERT_RETURN(index < 4, nullptr); static NativeParameter param; - static NativeParameterScalePoint scalePoints[2]; + static NativeParameterScalePoint scalePoints[3]; int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE; @@ -86,12 +86,14 @@ protected: param.name = "Style"; param.ranges.def = 1.0f; param.ranges.min = 1.0f; - param.ranges.max = 2.0f; + param.ranges.max = 3.0f; scalePoints[0].value = 1.0f; scalePoints[0].label = "Default"; scalePoints[1].value = 2.0f; scalePoints[1].label = "OpenAV"; - param.scalePointCount = 2; + scalePoints[2].value = 3.0f; + scalePoints[2].label = "RNCBC"; + param.scalePointCount = 3; param.scalePoints = scalePoints; break; case 2: diff --git a/source/native-plugins/resources/bigmeter-ui b/source/native-plugins/resources/bigmeter-ui index e0a67a0f7..f9da9526a 100755 --- a/source/native-plugins/resources/bigmeter-ui +++ b/source/native-plugins/resources/bigmeter-ui @@ -52,9 +52,9 @@ class DistrhoUIBigMeter(ExternalUI, DigitalPeakMeter): 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 @@ -72,15 +72,18 @@ class DistrhoUIBigMeter(ExternalUI, DigitalPeakMeter): if index == 0: color = int(value) - if color not in (DigitalPeakMeter.GREEN, DigitalPeakMeter.BLUE): + if color not in (DigitalPeakMeter.COLOR_GREEN, + DigitalPeakMeter.COLOR_BLUE): return - self.setColor(color) + self.setMeterColor(color) elif index == 1: 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 self.setMeterStyle(style)