Browse Source

Misc fixing

tags/1.9.5
falkTX 11 years ago
parent
commit
e06345d63e
5 changed files with 37 additions and 33 deletions
  1. +1
    -1
      source/carla_host.py
  2. +11
    -11
      source/carla_skin.py
  3. +17
    -13
      source/carla_widgets.py
  4. +7
    -7
      source/modules/native-plugins/bigmeter.cpp
  5. +1
    -1
      source/modules/native-plugins/resources/bigmeter-ui

+ 1
- 1
source/carla_host.py View File

@@ -215,7 +215,7 @@ class HostWindow(QMainWindow, PluginEditParentMeta):

self.fPanelTime = CarlaPanelTime(host, self)
self.fPanelTime.setEnabled(False)
self.fPanelTime.show()
QTimer.singleShot(0, self.fPanelTime.show)

# ----------------------------------------------------------------------------------------------------
# Set up GUI (rack)


+ 11
- 11
source/carla_skin.py View File

@@ -129,20 +129,16 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta):
self.fParameterIconTimer = ICON_STATE_NULL
self.fParameterList = [] # index, widget

if host.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK:
self.fPeaksInputCount = 2
self.fPeaksOutputCount = 2
else:
audioCountInfo = host.get_audio_port_count_info(self.fPluginId)
audioCountInfo = host.get_audio_port_count_info(self.fPluginId)

self.fPeaksInputCount = int(audioCountInfo['ins'])
self.fPeaksOutputCount = int(audioCountInfo['outs'])
self.fPeaksInputCount = int(audioCountInfo['ins'])
self.fPeaksOutputCount = int(audioCountInfo['outs'])

if self.fPeaksInputCount > 2:
self.fPeaksInputCount = 2
if self.fPeaksInputCount > 2:
self.fPeaksInputCount = 2

if self.fPeaksOutputCount > 2:
self.fPeaksOutputCount = 2
if self.fPeaksOutputCount > 2:
self.fPeaksOutputCount = 2

# used during testing
self.fIdleTimerId = 0
@@ -288,11 +284,15 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta):
self.peak_in.setColor(DigitalPeakMeter.GREEN)
self.peak_in.setChannels(self.fPeaksInputCount)
self.peak_in.setOrientation(DigitalPeakMeter.HORIZONTAL)
if self.fPeaksInputCount == 0:
self.peak_in.hide()

if self.peak_out is not None:
self.peak_out.setColor(DigitalPeakMeter.BLUE)
self.peak_out.setChannels(self.fPeaksOutputCount)
self.peak_out.setOrientation(DigitalPeakMeter.HORIZONTAL)
if self.fPeaksOutputCount == 0:
self.peak_out.hide()

for paramIndex, paramWidget in self.fParameterList:
paramWidget.setContextMenuPolicy(Qt.CustomContextMenu)


+ 17
- 13
source/carla_widgets.py View File

@@ -1107,30 +1107,34 @@ class PluginEdit(QDialog):
for paramType, paramId, paramWidget in self.fParameterList:
if paramId != index:
continue
# FIXME see below
if paramType != PARAMETER_INPUT:
continue

paramWidget.blockSignals(True)
paramWidget.setValue(value)
paramWidget.blockSignals(False)

if paramType == PARAMETER_INPUT:
tabIndex = paramWidget.getTabIndex()

if self.fTabIconTimers[tabIndex-1] == ICON_STATE_NULL:
self.ui.tabWidget.setTabIcon(tabIndex, self.fTabIconOn)
#if paramType == PARAMETER_INPUT:
tabIndex = paramWidget.getTabIndex()

self.fTabIconTimers[tabIndex-1] = ICON_STATE_ON
if self.fTabIconTimers[tabIndex-1] == ICON_STATE_NULL:
self.ui.tabWidget.setTabIcon(tabIndex, self.fTabIconOn)

self.fTabIconTimers[tabIndex-1] = ICON_STATE_ON
break

# Clear all parameters
self.fParametersToUpdate = []

# Update parameter outputs
#for paramType, paramId, paramWidget in self.fParameterList:
#if paramType != PARAMETER_OUTPUT:
#continue
# Update parameter outputs | FIXME needed?
for paramType, paramId, paramWidget in self.fParameterList:
if paramType != PARAMETER_OUTPUT:
continue

#paramWidget.blockSignals(True)
#paramWidget.setValue(self.host.get_current_parameter_value(self.fPluginId, paramId))
#paramWidget.blockSignals(False)
paramWidget.blockSignals(True)
paramWidget.setValue(self.host.get_current_parameter_value(self.fPluginId, paramId))
paramWidget.blockSignals(False)

#------------------------------------------------------------------



+ 7
- 7
source/modules/native-plugins/bigmeter.cpp View File

@@ -143,12 +143,6 @@ protected:
case 1:
fStyle = int(value);
break;
case 2:
fOutLeft = value;
break;
case 3:
fOutRight = value;
break;
default:
break;
}
@@ -157,6 +151,12 @@ protected:
// -------------------------------------------------------------------
// Plugin process calls

void activate() override
{
fOutLeft = 0.0f;
fOutRight = 0.0f;
}

void process(float** inputs, float**, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override
{
Range<float> range;
@@ -180,7 +180,7 @@ private:

static const NativePluginDescriptor bigmeterDesc = {
/* category */ PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI),
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_NEEDS_FIXED_BUFFERS),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 2,
/* audioOuts */ 0,


+ 1
- 1
source/modules/native-plugins/resources/bigmeter-ui View File

@@ -39,7 +39,7 @@ class DistrhoUIBigMeter(ExternalUI, DigitalPeakMeter):

#self.setSmoothRelease(0) # till 5

self.resize(30, 400)
self.resize(50, 400)
self.setWindowTitle(self.fUiName)

self.fIdleTimer = self.startTimer(30)


Loading…
Cancel
Save