Browse Source

Change canvas settings without restart; misc changes

tags/1.9.4
falkTX 11 years ago
parent
commit
69c37bc651
9 changed files with 81 additions and 9 deletions
  1. +0
    -1
      source/Makefile.mk
  2. +5
    -0
      source/backend/CarlaEngine.hpp
  3. +1
    -0
      source/backend/CarlaStandalone.hpp
  4. +5
    -0
      source/backend/engine/CarlaEngine.cpp
  5. +22
    -0
      source/backend/engine/CarlaEngineJack.cpp
  6. +9
    -0
      source/backend/standalone/CarlaStandalone.cpp
  7. +26
    -4
      source/carla.py
  8. +6
    -0
      source/carla_backend.py
  9. +7
    -4
      source/discovery/carla-discovery.pro

+ 0
- 1
source/Makefile.mk View File

@@ -11,7 +11,6 @@ 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
WINDRES ?= windres

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



+ 5
- 0
source/backend/CarlaEngine.hpp View File

@@ -871,6 +871,11 @@ public:
*/
virtual void patchbayDisconnect(int connectionId);

/*!
* TODO.
*/
virtual void patchbayRefresh();

// -------------------------------------------------------------------
// Transport



+ 1
- 0
source/backend/CarlaStandalone.hpp View File

@@ -173,6 +173,7 @@ CARLA_EXPORT bool carla_save_project(const char* filename);

CARLA_EXPORT void carla_patchbay_connect(int portA, int portB);
CARLA_EXPORT void carla_patchbay_disconnect(int connectionId);
CARLA_EXPORT void carla_patchbay_refresh();

CARLA_EXPORT void carla_transport_play();
CARLA_EXPORT void carla_transport_pause();


+ 5
- 0
source/backend/engine/CarlaEngine.cpp View File

@@ -1154,6 +1154,11 @@ void CarlaEngine::patchbayDisconnect(int)
// nothing
}

void CarlaEngine::patchbayRefresh()
{
// nothing
}

// -----------------------------------------------------------------------
// Transport



+ 22
- 0
source/backend/engine/CarlaEngineJack.cpp View File

@@ -746,6 +746,8 @@ public:

void patchbayConnect(int portA, int portB)
{
CARLA_ASSERT(fClient != nullptr);

if (fClient == nullptr)
return;

@@ -757,6 +759,8 @@ public:

void patchbayDisconnect(int connectionId)
{
CARLA_ASSERT(fClient != nullptr);

if (fClient == nullptr)
return;

@@ -772,6 +776,24 @@ public:
}
}
}

void patchbayRefresh()
{
CARLA_ASSERT(fClient != nullptr);

if (fClient == nullptr)
return;

fLastGroupId = 0;
fLastPortId = 0;
fLastConnectionId = 0;

fUsedGroupNames.clear();
fUsedPortNames.clear();
fUsedConnections.clear();

initJackPatchbay(jackbridge_get_client_name(fClient));
}
#endif

// -------------------------------------------------------------------


+ 9
- 0
source/backend/standalone/CarlaStandalone.cpp View File

@@ -555,6 +555,15 @@ void carla_patchbay_disconnect(int connectionId)
return standalone.engine->patchbayDisconnect(connectionId);
}

void carla_patchbay_refresh()
{
carla_debug("carla_patchbay_refresh(%i)", connectionId);
CARLA_ASSERT(standalone.engine != nullptr);

if (standalone.engine != nullptr)
return standalone.engine->patchbayRefresh();
}

// -------------------------------------------------------------------------------------------------------------------

void carla_transport_play()


+ 26
- 4
source/carla.py View File

@@ -587,10 +587,10 @@ class CarlaMainW(QMainWindow):

self.scene = patchcanvas.PatchScene(self, self.ui.graphicsView)
self.ui.graphicsView.setScene(self.scene)
#self.ui.graphicsView.setRenderHint(QPainter.Antialiasing, bool(self.fSavedSettings["Canvas/Antialiasing"] == patchcanvas.ANTIALIASING_FULL))
#if self.fSavedSettings["Canvas/UseOpenGL"] and hasGL:
#self.ui.graphicsView.setViewport(QGLWidget(self.ui.graphicsView))
#self.ui.graphicsView.setRenderHint(QPainter.HighQualityAntialiasing, self.fSavedSettings["Canvas/HighQualityAntialiasing"])
self.ui.graphicsView.setRenderHint(QPainter.Antialiasing, bool(self.fSavedSettings["Canvas/Antialiasing"] == patchcanvas.ANTIALIASING_FULL))
if self.fSavedSettings["Canvas/UseOpenGL"] and hasGL:
self.ui.graphicsView.setViewport(QGLWidget(self.ui.graphicsView))
self.ui.graphicsView.setRenderHint(QPainter.HighQualityAntialiasing, self.fSavedSettings["Canvas/HighQualityAntialiasing"])

pOptions = patchcanvas.options_t()
pOptions.theme_name = self.fSavedSettings["Canvas/Theme"]
@@ -1080,6 +1080,28 @@ class CarlaMainW(QMainWindow):
dialog = CarlaSettingsW(self)
if dialog.exec_():
self.loadSettings(False)
patchcanvas.clear()

pOptions = patchcanvas.options_t()
pOptions.theme_name = self.fSavedSettings["Canvas/Theme"]
pOptions.auto_hide_groups = self.fSavedSettings["Canvas/AutoHideGroups"]
pOptions.use_bezier_lines = self.fSavedSettings["Canvas/UseBezierLines"]
pOptions.antialiasing = self.fSavedSettings["Canvas/Antialiasing"]
pOptions.eyecandy = self.fSavedSettings["Canvas/EyeCandy"]

pFeatures = patchcanvas.features_t()
pFeatures.group_info = False
pFeatures.group_rename = False
pFeatures.port_info = False
pFeatures.port_rename = False
pFeatures.handle_group_pos = True

patchcanvas.setOptions(pOptions)
patchcanvas.setFeatures(pFeatures)
patchcanvas.init("Carla", self.scene, canvasCallback, False)

if self.fEngineStarted:
Carla.host.patchbay_refresh()

for pwidget in self.fPluginList:
if pwidget is None:


+ 6
- 0
source/carla_backend.py View File

@@ -200,6 +200,9 @@ class Host(object):
self.lib.carla_patchbay_disconnect.argtypes = [c_int]
self.lib.carla_patchbay_disconnect.restype = None

self.lib.carla_patchbay_refresh.argtypes = None
self.lib.carla_patchbay_refresh.restype = None

self.lib.carla_transport_play.argtypes = None
self.lib.carla_transport_play.restype = None

@@ -428,6 +431,9 @@ class Host(object):
def patchbay_disconnect(self, connectionId):
self.lib.carla_patchbay_disconnect(connectionId)

def patchbay_refresh(self):
self.lib.carla_patchbay_refresh()

def transport_play(self):
self.lib.carla_transport_play()



+ 7
- 4
source/discovery/carla-discovery.pro View File

@@ -1,5 +1,7 @@
# QtCreator project file

QT = core

TARGET = carla-discovery-qtcreator
TEMPLATE = app
VERSION = 0.5.0
@@ -7,7 +9,7 @@ VERSION = 0.5.0
# -------------------------------------------------------

CONFIG = debug
CONFIG += link_pkgconfig shared warn_on
CONFIG += link_pkgconfig qt shared warn_on

DEFINES = DEBUG
DEFINES += QTCREATOR_TEST
@@ -19,8 +21,7 @@ DEFINES += WANT_VST
DEFINES += WANT_FLUIDSYNTH
DEFINES += WANT_LINUXSAMPLER

PKGCONFIG = QtCore
PKGCONFIG += fluidsynth
PKGCONFIG = fluidsynth
PKGCONFIG += linuxsampler

SOURCES = \
@@ -37,11 +38,13 @@ HEADERS += \
../includes/ladspa_rdf.hpp \
../includes/lv2_rdf.hpp \
../utils/CarlaUtils.hpp \
../utils/CarlaBase64Utils.hpp \
../utils/CarlaJuceUtils.hpp \
../utils/CarlaLibUtils.hpp \
../utils/CarlaLadspaUtils.hpp \
../utils/CarlaLv2Utils.hpp \
../utils/CarlaVstUtils.hpp
../utils/CarlaVstUtils.hpp \
../utils/CarlaString.hpp

INCLUDEPATH = \
../backend \


Loading…
Cancel
Save