Browse Source

carla-plugin: Send max-plugin-number var

tags/1.9.5
falkTX 11 years ago
parent
commit
defc31830e
3 changed files with 10 additions and 1 deletions
  1. +4
    -0
      source/backend/engine/CarlaEngineNative.cpp
  2. +2
    -1
      source/carla_backend.py
  3. +4
    -0
      source/modules/native-plugins/resources/carla-plugin

+ 4
- 0
source/backend/engine/CarlaEngineNative.cpp View File

@@ -961,6 +961,10 @@ protected:

fUiServer.writeAndFixMsg("carla-file-exts");
fUiServer.writeAndFixMsg(carla_get_supported_file_extensions());

fUiServer.writeAndFixMsg("carla-max-plugin-number");
std::sprintf(fTmpBuf, "%i\n", pData->maxPluginNumber);
fUiServer.writeMsg(fTmpBuf);
}

void uiServerOptions()


+ 2
- 1
source/carla_backend.py View File

@@ -2894,6 +2894,7 @@ class CarlaHostPlugin(CarlaHostMeta):
self.fCompleteLicenseText = ""
self.fJuceVersion = ""
self.fSupportedFileExts = ""
self.fMaxPluginNumber = 0
self.fLastError = ""
self.fOscUrlTCP = ""
self.fOscUrlUDP = ""
@@ -3007,7 +3008,7 @@ class CarlaHostPlugin(CarlaHostMeta):
return len(self.fPluginsInfo)

def get_max_plugin_number(self):
return 0 # TODO
return self.fMaxPluginNumber

def add_plugin(self, btype, ptype, filename, name, label, uniqueId, extraPtr):
return self.sendMsgAndSetError(["add_plugin", btype, ptype, filename, name, label, uniqueId])


+ 4
- 0
source/modules/native-plugins/resources/carla-plugin View File

@@ -320,6 +320,10 @@ class CarlaMiniW(ExternalUI, HostWindow):
exts = self.readlineblock().replace("\r", "\n")
self.host.fSupportedFileExts = exts

elif msg == "carla-max-plugin-number":
maxnum = int(self.readlineblock())
self.host.fMaxPluginNumber = maxnum

elif msg == "error":
error = self.readlineblock().replace("\r", "\n")
engineCallback(self.host, ENGINE_CALLBACK_ERROR, 0, 0, 0, 0.0, error)


Loading…
Cancel
Save