Browse Source

Fix previous commits

tags/1.9.4
falkTX 11 years ago
parent
commit
ca63a4f9ef
4 changed files with 20 additions and 26 deletions
  1. +4
    -1
      source/backend/engine/CarlaEngine.cpp
  2. +12
    -8
      source/backend/engine/CarlaEngineJack.cpp
  3. +2
    -2
      source/carla_host.py
  4. +2
    -15
      source/carla_patchbay.py

+ 4
- 1
source/backend/engine/CarlaEngine.cpp View File

@@ -815,10 +815,13 @@ bool CarlaEngine::removePlugin(const unsigned int id)
bool CarlaEngine::removeAllPlugins()
{
CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins != nullptr, "Invalid engine internal data (err #18)");
CARLA_SAFE_ASSERT_RETURN_ERR(pData->curPluginCount != 0, "Invalid engine internal data (err #19)");
CARLA_SAFE_ASSERT_RETURN_ERR(pData->nextPluginId == pData->maxPluginNumber, "Invalid engine internal data (err #19)");
CARLA_SAFE_ASSERT_RETURN_ERR(pData->nextAction.opcode == kEnginePostActionNull, "Invalid engine internal data (err #20)");
carla_debug("CarlaEngine::removeAllPlugins()");

if (pData->curPluginCount == 0)
return true;

pData->thread.stopThread(500);

const bool lockWait(isRunning());


+ 12
- 8
source/backend/engine/CarlaEngineJack.cpp View File

@@ -1475,12 +1475,14 @@ protected:

if (jackPortFlags & JackPortIsPhysical)
{
callback(CALLBACK_PATCHBAY_CLIENT_ADDED, 0, groupId, 0, 0.0f, "hardware");
callback(CALLBACK_PATCHBAY_CLIENT_ADDED, 0, groupId, 0, 0.0f, groupName);
// hardware
}
else
{
callback(CALLBACK_PATCHBAY_CLIENT_ADDED, 0, groupId, 0, 0.0f, "application");
callback(CALLBACK_PATCHBAY_CLIENT_ADDED, 0, groupId, 0, 0.0f, groupName);
fGroupIconsChanged.append(groupId);
// "application"
}
}

@@ -1871,7 +1873,8 @@ private:
GroupNameToId groupNameToId(fLastGroupId++, ourName);
fUsedGroupNames.append(groupNameToId);

callback(CALLBACK_PATCHBAY_CLIENT_ADDED, 0, groupNameToId.id, 0, 0.0f, "carla");
callback(CALLBACK_PATCHBAY_CLIENT_ADDED, 0, groupNameToId.id, 0, 0.0f, ourName);
// carla
}

if (const char** ports = jackbridge_get_ports(fClient, nullptr, nullptr, 0))
@@ -1912,15 +1915,16 @@ private:

if (jackPortFlags & JackPortIsPhysical)
{
callback(CALLBACK_PATCHBAY_CLIENT_ADDED, 0, groupId, 0, 0.0f, "hardware");
// "hardware"
}
else if (jackbridge_custom_get_data(fClient, groupName, URI_CANVAS_ICON, &data, &dataSize) && data != nullptr && dataSize != 0)
{
const char* const icon((const char*)data);
CARLA_ASSERT(std::strlen(icon)+1 == dataSize);

callback(CALLBACK_PATCHBAY_CLIENT_ADDED, 0, groupId, 0, 0.0f, icon);
//const char* const icon((const char*)data);
//CARLA_ASSERT(std::strlen(icon)+1 == dataSize);
// icon
}

callback(CALLBACK_PATCHBAY_CLIENT_ADDED, 0, groupId, 0, 0.0f, groupName);
}

bool portIsInput = (jackPortFlags & JackPortIsInput);


+ 2
- 2
source/carla_host.py View File

@@ -122,7 +122,7 @@ class HostWindow(QMainWindow):
ReloadParametersCallback = pyqtSignal(int)
ReloadProgramsCallback = pyqtSignal(int)
ReloadAllCallback = pyqtSignal(int)
PatchbayClientAddedCallback = pyqtSignal(int, int, str)
PatchbayClientAddedCallback = pyqtSignal(int, str)
PatchbayClientRemovedCallback = pyqtSignal(int, str)
PatchbayClientRenamedCallback = pyqtSignal(int, str)
PatchbayPortAddedCallback = pyqtSignal(int, int, int, str)
@@ -1055,7 +1055,7 @@ def EngineCallback(ptr, action, pluginId, value1, value2, value3, valueStr):
elif action == CALLBACK_RELOAD_ALL:
Carla.gui.ReloadAllCallback.emit(pluginId)
elif action == CALLBACK_PATCHBAY_CLIENT_ADDED:
Carla.gui.PatchbayClientAddedCallback.emit(value1, value2, cString(valueStr))
Carla.gui.PatchbayClientAddedCallback.emit(value1, cString(valueStr))
elif action == CALLBACK_PATCHBAY_CLIENT_REMOVED:
Carla.gui.PatchbayClientRemovedCallback.emit(value1, cString(valueStr))
elif action == CALLBACK_PATCHBAY_CLIENT_RENAMED:


+ 2
- 15
source/carla_patchbay.py View File

@@ -533,21 +533,8 @@ class CarlaPatchbayW(QGraphicsView):
# -----------------------------------------------------------------

@pyqtSlot(int, int, str)
def slot_handlePatchbayClientAddedCallback(self, clientId, clientIcon, clientName):
pcSplit = patchcanvas.SPLIT_UNDEF
pcIcon = patchcanvas.ICON_APPLICATION

if clientIcon == PATCHBAY_ICON_HARDWARE:
pcSplit = patchcanvas.SPLIT_YES
pcIcon = patchcanvas.ICON_HARDWARE
elif clientIcon == PATCHBAY_ICON_DISTRHO:
pcIcon = patchcanvas.ICON_DISTRHO
elif clientIcon == PATCHBAY_ICON_FILE:
pcIcon = patchcanvas.ICON_FILE
elif clientIcon == PATCHBAY_ICON_PLUGIN:
pcIcon = patchcanvas.ICON_PLUGIN

patchcanvas.addGroup(clientId, clientName, pcSplit, pcIcon)
def slot_handlePatchbayClientAddedCallback(self, clientId, clientName):
patchcanvas.addGroup(clientId, clientName)
#QTimer.singleShot(0, self.ui.miniCanvasPreview, SLOT("update()"))

@pyqtSlot(int, str)


Loading…
Cancel
Save