Browse Source

Fix build

tags/1.9.4
falkTX 11 years ago
parent
commit
b7847f4325
12 changed files with 39 additions and 41 deletions
  1. +1
    -1
      source/backend/CarlaPlugin.hpp
  2. +16
    -16
      source/backend/engine/CarlaEngine.cpp
  3. +2
    -2
      source/backend/engine/CarlaEngineNative.cpp
  4. +3
    -3
      source/backend/plugin/CarlaPlugin.cpp
  5. +2
    -2
      source/backend/plugin/CsoundPlugin.cpp
  6. +1
    -1
      source/backend/plugin/FluidSynthPlugin.cpp
  7. +1
    -0
      source/backend/plugin/Makefile
  8. +2
    -2
      source/bridges/CarlaBridgePlugin.cpp
  9. +1
    -0
      source/bridges/Makefile
  10. +2
    -6
      source/carla_host.py
  11. +4
    -4
      source/discovery/carla-discovery.cpp
  12. +4
    -4
      source/utils/CarlaStateUtils.hpp

+ 1
- 1
source/backend/CarlaPlugin.hpp View File

@@ -842,7 +842,7 @@ public:
static CarlaPlugin* newLV2(const Initializer& init);
static CarlaPlugin* newVST(const Initializer& init);
static CarlaPlugin* newAU(const Initializer& init);
static CarlaPlugin* newCSOUND(const Initializer& init);
static CarlaPlugin* newCsound(const Initializer& init);
static CarlaPlugin* newGIG(const Initializer& init, const bool use16Outs);
static CarlaPlugin* newSF2(const Initializer& init, const bool use16Outs);
static CarlaPlugin* newSFZ(const Initializer& init, const bool use16Outs);


+ 16
- 16
source/backend/engine/CarlaEngine.cpp View File

@@ -1261,23 +1261,23 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons
break;

case PLUGIN_AU:
//plugin = CarlaPlugin::newAU(init);
plugin = CarlaPlugin::newAU(init);
break;

case PLUGIN_CSOUND:
//plugin = CarlaPlugin::newCSOUND(init);
case PLUGIN_FILE_CSD:
plugin = CarlaPlugin::newCsound(init);
break;

case PLUGIN_GIG:
plugin = CarlaPlugin::newGIG(init, (extra != nullptr));
case PLUGIN_FILE_GIG:
plugin = CarlaPlugin::newGIG(init, (extra != nullptr && std::strcmp((const char*)extra, "true")));
break;

case PLUGIN_SF2:
plugin = CarlaPlugin::newSF2(init, (extra != nullptr));
case PLUGIN_FILE_SF2:
plugin = CarlaPlugin::newSF2(init, (extra != nullptr && std::strcmp((const char*)extra, "true")));
break;

case PLUGIN_SFZ:
plugin = CarlaPlugin::newSFZ(init, (extra != nullptr));
case PLUGIN_FILE_SFZ:
plugin = CarlaPlugin::newSFZ(init, (extra != nullptr && std::strcmp((const char*)extra, "true")));
break;
}
}
@@ -1614,22 +1614,22 @@ bool CarlaEngine::loadFile(const char* const filename)

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

if (extension == "carxp" || extension == "carxs")
if (extension == "carxp" || extension == "carxs")
return loadProject(filename);

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

if (extension == "csd")
return addPlugin(PLUGIN_CSOUND, filename, baseName, baseName);
return addPlugin(PLUGIN_FILE_CSD, filename, baseName, baseName);

if (extension == "gig")
return addPlugin(PLUGIN_GIG, filename, baseName, baseName);
return addPlugin(PLUGIN_FILE_GIG, filename, baseName, baseName);

if (extension == "sf2")
return addPlugin(PLUGIN_SF2, filename, baseName, baseName);
return addPlugin(PLUGIN_FILE_SF2, filename, baseName, baseName);

if (extension == "sfz")
return addPlugin(PLUGIN_SFZ, filename, baseName, baseName);
return addPlugin(PLUGIN_FILE_SFZ, filename, baseName, baseName);

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

@@ -1754,8 +1754,8 @@ bool CarlaEngine::loadProject(const char* const filename)

if (CarlaString(saveState.label).endsWith(kUse16OutsSuffix))
{
if (std::strcmp(saveState.type, "GIG") == 0 || std::strcmp(saveState.type, "SF2") == 0 || std::strcmp(saveState.type, "SFZ") == 0)
extraStuff = (void*)0x1; // non-null
if (std::strcmp(saveState.type, "GIG") == 0 || std::strcmp(saveState.type, "SF2") == 0)
extraStuff = "true";
}

// TODO - proper find&load plugins


+ 2
- 2
source/backend/engine/CarlaEngineNative.cpp View File

@@ -741,8 +741,8 @@ protected:

if (CarlaString(saveState.label).endsWith(kUse16OutsSuffix))
{
if (std::strcmp(saveState.type, "GIG") == 0 || std::strcmp(saveState.type, "SF2") == 0 || std::strcmp(saveState.type, "SFZ") == 0)
extraStuff = (void*)0x1; // non-null
if (std::strcmp(saveState.type, "GIG") == 0 || std::strcmp(saveState.type, "SF2") == 0)
extraStuff = "true";
}

// TODO - proper find&load plugins


+ 3
- 3
source/backend/plugin/CarlaPlugin.cpp View File

@@ -601,7 +601,7 @@ const SaveState& CarlaPlugin::getSaveState()
void CarlaPlugin::loadSaveState(const SaveState& saveState)
{
char strBuf[STR_MAX+1];
const bool usesMultiProgs(getType() == PLUGIN_SF2 || (getType() == PLUGIN_INTERNAL && getCategory() == PLUGIN_CATEGORY_SYNTH));
const bool usesMultiProgs(getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || (getType() == PLUGIN_INTERNAL && getCategory() == PLUGIN_CATEGORY_SYNTH));

gIsLoadingProject = true;
ScopedValueSetter<bool>(gIsLoadingProject, false);
@@ -1294,7 +1294,7 @@ void CarlaPlugin::setProgram(const int32_t index, const bool sendGui, const bool
uiProgramChange(index);
#endif

if (getType() == PLUGIN_GIG || getType() == PLUGIN_SF2 || getType() == PLUGIN_SFZ)
if (getType() == PLUGIN_FILE_CSD || getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || getType() == PLUGIN_FILE_SFZ)
return;

for (uint32_t i=0; i < pData->param.count; ++i)
@@ -1350,7 +1350,7 @@ void CarlaPlugin::setMidiProgram(const int32_t index, const bool sendGui, const
uiMidiProgramChange(index);
#endif

if (getType() == PLUGIN_GIG || getType() == PLUGIN_SF2 || getType() == PLUGIN_SFZ)
if (getType() == PLUGIN_FILE_CSD || getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || getType() == PLUGIN_FILE_SFZ)
return;

for (uint32_t i=0; i < pData->param.count; ++i)


+ 2
- 2
source/backend/plugin/CsoundPlugin.cpp View File

@@ -81,9 +81,9 @@ CARLA_BACKEND_END_NAMESPACE

CARLA_BACKEND_START_NAMESPACE

CarlaPlugin* CarlaPlugin::newCSOUND(const Initializer& init)
CarlaPlugin* CarlaPlugin::newCsound(const Initializer& init)
{
carla_debug("CarlaPlugin::newCSOUND(%p, \"%s\", \"%s\", \"%s\")", init.engine, init.filename, init.name, init.label);
carla_debug("CarlaPlugin::newCsound(%p, \"%s\", \"%s\", \"%s\")", init.engine, init.filename, init.name, init.label);

#ifdef WANT_CSOUND
CsoundPlugin* const plugin(new CsoundPlugin(init.engine, init.id));


+ 1
- 1
source/backend/plugin/FluidSynthPlugin.cpp View File

@@ -128,7 +128,7 @@ public:

PluginType getType() const noexcept override
{
return PLUGIN_SF2;
return PLUGIN_FILE_SF2;
}

PluginCategory getCategory() const override


+ 1
- 0
source/backend/plugin/Makefile View File

@@ -17,6 +17,7 @@ OBJS = \
DssiPlugin.cpp.o \
Lv2Plugin.cpp.o \
VstPlugin.cpp.o \
AuPlugin.cpp.o \
CsoundPlugin.cpp.o \
FluidSynthPlugin.cpp.o \
LinuxSamplerPlugin.cpp.o \


+ 2
- 2
source/bridges/CarlaBridgePlugin.cpp View File

@@ -546,13 +546,13 @@ int main(int argc, char* argv[])

const void* extraStuff = nullptr;

if (itype == CarlaBackend::PLUGIN_GIG || itype == CarlaBackend::PLUGIN_SF2 || itype == CarlaBackend::PLUGIN_SFZ)
if (itype == CarlaBackend::PLUGIN_FILE_GIG || itype == CarlaBackend::PLUGIN_FILE_SF2)
{
if (label == nullptr)
label = clientName;

if (std::strstr(label, " (16 outs)") == 0)
extraStuff = (const void*)label; // dummy non-null pointer
extraStuff = "true";
}

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


+ 1
- 0
source/bridges/Makefile View File

@@ -384,6 +384,7 @@ OBJS_NATIVE += \
../backend/plugin/VstPlugin__native.o \
../backend/plugin/AuPlugin__native.o \
../backend/plugin/JucePlugin__native.o \
../backend/plugin/CsoundPlugin__native.o \
../backend/plugin/FluidSynthPlugin__native.o \
../backend/plugin/LinuxSamplerPlugin__native.o



+ 2
- 6
source/carla_host.py View File

@@ -508,13 +508,9 @@ class HostWindow(QMainWindow):
if rdfItem.UniqueID == uniqueId:
return pointer(rdfItem)

elif ptype in (PLUGIN_GIG, PLUGIN_SF2, PLUGIN_SFZ):
elif ptype in (PLUGIN_GIG, PLUGIN_SF2):
if plugin['name'].lower().endswith(" (16 outputs)"):
# return a dummy non-null pointer
INTPOINTER = POINTER(c_int)
int1 = c_int(0x1)
addr = addressof(int1)
return cast(addr, INTPOINTER)
return c_char_p("true")

return None



+ 4
- 4
source/discovery/carla-discovery.cpp View File

@@ -1908,16 +1908,16 @@ int main(int argc, char* argv[])
do_au_check(handle, doInit);
#endif
break;
case PLUGIN_CSOUND:
case PLUGIN_FILE_CSD:
do_csound_check(filename, doInit);
break;
case PLUGIN_GIG:
case PLUGIN_FILE_GIG:
do_linuxsampler_check(filename, "gig", doInit);
break;
case PLUGIN_SF2:
case PLUGIN_FILE_SF2:
do_fluidsynth_check(filename, doInit);
break;
case PLUGIN_SFZ:
case PLUGIN_FILE_SFZ:
do_linuxsampler_check(filename, "sfz", doInit);
break;
default:


+ 4
- 4
source/utils/CarlaStateUtils.hpp View File

@@ -490,10 +490,10 @@ void fillXmlStringFromSaveState(QString& content, const SaveState& saveState)
info += QString(" <Binary>%1</Binary>\n").arg(xmlSafeString(saveState.binary, true));
info += QString(" <UniqueID>%1</UniqueID>\n").arg(saveState.uniqueID);
break;
case PLUGIN_CSOUND:
case PLUGIN_GIG:
case PLUGIN_SF2:
case PLUGIN_SFZ:
case PLUGIN_FILE_CSD:
case PLUGIN_FILE_GIG:
case PLUGIN_FILE_SF2:
case PLUGIN_FILE_SFZ:
info += QString(" <Filename>%1</Filename>\n").arg(xmlSafeString(saveState.binary, true));
info += QString(" <Label>%1</Label>\n").arg(xmlSafeString(saveState.label, true));
break;


Loading…
Cancel
Save