Browse Source

Prefer Qt4 over Qt5 if both available; minor UI changes; fixes

tags/1.9.4
falkTX 11 years ago
parent
commit
1a35e78108
5 changed files with 213 additions and 100 deletions
  1. +177
    -88
      resources/ui/carla_edit.ui
  2. +3
    -0
      resources/ui/carla_parameter.ui
  3. +13
    -8
      source/Makefile.mk
  4. +7
    -2
      source/backend/plugin/VstPlugin.cpp
  5. +13
    -2
      source/carla_shared.py

+ 177
- 88
resources/ui/carla_edit.ui View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>672</width>
<height>553</height>
<width>686</width>
<height>523</height>
</rect>
</property>
<property name="windowTitle">
@@ -113,27 +113,43 @@ Plugin Name
<string>Information</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="0">
<widget class="QLabel" name="label_unique_id">
<item row="1" column="1">
<widget class="QLineEdit" name="le_label">
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_maker">
<property name="text">
<string>Unique ID:</string>
<string>Maker:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="le_copyright">
<item row="6" column="1">
<widget class="QLineEdit" name="le_ains">
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="le_maker">
<property name="readOnly">
<bool>true</bool>
<item row="4" column="0">
<widget class="QLabel" name="label_unique_id">
<property name="text">
<string>Unique ID:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
@@ -149,88 +165,65 @@ Plugin Name
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="le_name">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_type">
<property name="text">
<string>Type:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="le_params">
<property name="readOnly">
<bool>true</bool>
<property name="frame">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="le_label">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_maker">
<item row="8" column="0">
<widget class="QLabel" name="label_params">
<property name="text">
<string>Maker:</string>
<string>Parameters:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="le_unique_id">
<item row="3" column="1">
<widget class="QLineEdit" name="le_copyright">
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_copyright">
<property name="text">
<string>Copyright:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_real_name">
<item row="5" column="0">
<widget class="QLabel" name="label_type">
<property name="text">
<string>Name:</string>
<string>Type:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="le_type">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="le_aouts">
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="le_ains">
<item row="8" column="1">
<widget class="QLineEdit" name="le_params">
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
@@ -256,10 +249,30 @@ Plugin Name
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_params">
<item row="4" column="1">
<widget class="QLineEdit" name="le_unique_id">
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_copyright">
<property name="text">
<string>Parameters:</string>
<string>Copyright:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_real_name">
<property name="text">
<string>Name:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -269,7 +282,7 @@ Plugin Name
<item row="9" column="0">
<widget class="QLabel" name="label_latency">
<property name="text">
<string>Latency</string>
<string>Latency:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -278,11 +291,50 @@ Plugin Name
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="le_latency">
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="le_type">
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="le_maker">
<property name="frame">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0" colspan="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>250</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@@ -484,6 +536,19 @@ Plugin Name
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
@@ -491,6 +556,19 @@ Plugin Name
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_ctrl_channel">
<property name="text">
@@ -520,34 +598,51 @@ Plugin Name
</layout>
</item>
<item>
<widget class="QTabWidget" name="tab_programs">
<widget class="QStackedWidget" name="tab_programs">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tabPosition">
<enum>QTabWidget::South</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="programs">
<attribute name="title">
<string>Programs</string>
</attribute>
<widget class="QWidget" name="tab_programsPage1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_programs">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Program:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cb_programs"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="midi_programs">
<attribute name="title">
<string>MIDI Programs</string>
</attribute>
<widget class="QWidget" name="tab_programsPage2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_midi_programs">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>MIDI Program:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cb_midi_programs"/>
</item>
@@ -586,21 +681,12 @@ Plugin Name
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>84</height>
</size>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
@@ -610,7 +696,7 @@ Plugin Name
<x>0</x>
<y>0</y>
<width>864</width>
<height>64</height>
<height>65</height>
</rect>
</property>
<property name="sizePolicy">
@@ -622,16 +708,19 @@ Plugin Name
<property name="minimumSize">
<size>
<width>864</width>
<height>64</height>
<height>65</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>864</width>
<height>64</height>
<height>65</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>


+ 3
- 0
resources/ui/carla_parameter.ui View File

@@ -61,6 +61,9 @@
</item>
<item>
<widget class="QSpinBox" name="sb_channel">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="prefix">
<string>ch </string>
</property>


+ 13
- 8
source/Makefile.mk View File

@@ -7,16 +7,13 @@
AR ?= ar
CC ?= gcc
CXX ?= g++
MOC ?= $(shell pkg-config --variable=moc_location QtCore)
RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
UIC ?= $(shell pkg-config --variable=uic_location QtCore)
STRIP ?= strip

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

DEBUG ?= false

BASE_FLAGS = -Wall -Wextra -fPIC
BASE_FLAGS = -Wall -Wextra -fPIC

ifeq ($(DEBUG),true)
BASE_FLAGS += -O0 -g
@@ -53,7 +50,7 @@ BUILD_CXX_FLAGS += -DVESTIGE_HEADER

HAVE_JACK = $(shell pkg-config --exists jack && echo true)
HAVE_OPENGL = $(shell pkg-config --exists gl && echo true)
HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true)
HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true)

HAVE_AF_DEPS = $(shell pkg-config --exists libavcodec libavformat libavutil sndfile && echo true)
HAVE_MF_DEPS = $(shell pkg-config --exists smf && echo true)
@@ -75,11 +72,19 @@ HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
endif

ifneq ($(HAVE_QT4),true)
HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true)
endif

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

ifeq ($(HAVE_QT5),true)
# Qt5 doesn't define these
MOC = moc
RCC = rcc
UIC = uic
MOC ?= moc
RCC ?= rcc
UIC ?= uic
else
MOC ?= $(shell pkg-config --variable=moc_location QtCore)
RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
UIC ?= $(shell pkg-config --variable=uic_location QtCore)
endif

+ 7
- 2
source/backend/plugin/VstPlugin.cpp View File

@@ -304,8 +304,13 @@ public:
fLastChunk = std::malloc(chunk.size());
std::memcpy(fLastChunk, chunk.constData(), chunk.size());

const ScopedSingleProcessLocker spl(this, true);
dispatcher(effSetChunk, 0 /* bank */, chunk.size(), fLastChunk, 0.0f);
{
const ScopedSingleProcessLocker spl(this, true);
dispatcher(effSetChunk, 0 /* bank */, chunk.size(), fLastChunk, 0.0f);
}

// simulate an updateDisplay callback
handleAudioMasterCallback(audioMasterUpdateDisplay, 0, 0, nullptr, 0.0f);
}
}



+ 13
- 2
source/carla_shared.py View File

@@ -477,7 +477,7 @@ else:
carla_library_path = os.path.join(path, "carla", carla_libname)
break

# find any tool
# find tool
def findTool(tdir, tname):
if os.path.exists(os.path.join(CWD, tdir, tname)):
return os.path.join(CWD, tdir, tname)
@@ -1095,6 +1095,8 @@ class PluginEdit(QDialog):
self.fTabIconCount = 0
self.fTabIconTimers = []

self.fScrollAreaSetup = False

self.ui.dial_drywet.setPixmap(3)
self.ui.dial_drywet.setLabel("Dry/Wet")
self.ui.dial_vol.setPixmap(3)
@@ -1172,7 +1174,7 @@ class PluginEdit(QDialog):
self.reloadPrograms()

if not self.ui.scrollArea.isEnabled():
self.resize(self.width(), self.height()-self.ui.keyboard.height())
self.resize(self.width(), self.height()-self.ui.scrollArea.height())

def reloadInfo(self):
pluginName = cString(Carla.host.get_real_plugin_name(self.fPluginId))
@@ -1761,6 +1763,15 @@ class PluginEdit(QDialog):

self.fTabIconTimers.append(ICON_STATE_NULL)

def showEvent(self, event):
if not self.fScrollAreaSetup:
self.fScrollAreaSetup = True
minHeight = self.ui.scrollArea.height()+4
self.ui.scrollArea.setMinimumHeight(minHeight)
self.ui.scrollArea.setMaximumHeight(minHeight)

QDialog.showEvent(self, event)

def done(self, r):
QDialog.done(self, r)
self.close()


Loading…
Cancel
Save