Browse Source

Placeholder code for LinuxSampler 16outs version

tags/1.9.4
falkTX 11 years ago
parent
commit
a1b5237d45
5 changed files with 19 additions and 18 deletions
  1. +2
    -2
      source/backend/CarlaPlugin.hpp
  2. +2
    -2
      source/backend/engine/CarlaEngine.cpp
  3. +1
    -1
      source/backend/plugin/BridgePlugin.cpp
  4. +14
    -11
      source/backend/plugin/LinuxSamplerPlugin.cpp
  5. +0
    -2
      source/backend/plugin/Lv2Plugin.cpp

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

@@ -827,9 +827,9 @@ public:
static CarlaPlugin* newDSSI(const Initializer& init, const char* const guiFilename);
static CarlaPlugin* newLV2(const Initializer& init);
static CarlaPlugin* newVST(const Initializer& init);
static CarlaPlugin* newGIG(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);
static CarlaPlugin* newSFZ(const Initializer& init, const bool use16Outs);

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



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

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

case PLUGIN_GIG:
plugin = CarlaPlugin::newGIG(init);
plugin = CarlaPlugin::newGIG(init, (extra != nullptr));
break;

case PLUGIN_SF2:
@@ -779,7 +779,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons
break;

case PLUGIN_SFZ:
plugin = CarlaPlugin::newSFZ(init);
plugin = CarlaPlugin::newSFZ(init, (extra != nullptr));
break;
}
}


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

@@ -1008,7 +1008,7 @@ CarlaPlugin* CarlaPlugin::newBridge(const Initializer& init, BinaryType btype, P
return nullptr;
}

//plugin->reload();
plugin->reload();

return plugin;
#else


+ 14
- 11
source/backend/plugin/LinuxSamplerPlugin.cpp View File

@@ -162,9 +162,10 @@ CARLA_BACKEND_START_NAMESPACE
class LinuxSamplerPlugin : public CarlaPlugin
{
public:
LinuxSamplerPlugin(CarlaEngine* const engine, const unsigned short id, const bool isGIG)
LinuxSamplerPlugin(CarlaEngine* const engine, const unsigned short id, const bool isGIG, const bool use16Outs)
: CarlaPlugin(engine, id),
kIsGIG(isGIG),
kUses16Outs(use16Outs),
fSampler(nullptr),
fSamplerChannel(nullptr),
fEngine(nullptr),
@@ -988,10 +989,12 @@ public:

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

static CarlaPlugin* newLinuxSampler(const Initializer& init, bool isGIG);
static CarlaPlugin* newLinuxSampler(const Initializer& init, bool isGIG, const bool use16Outs);

private:
const bool kIsGIG;
const bool kUses16Outs;

CarlaString fRealName;
CarlaString fLabel;
CarlaString fMaker;
@@ -1010,11 +1013,11 @@ private:
std::vector<LinuxSampler::InstrumentManager::instrument_id_t> fInstrumentIds;
};

CarlaPlugin* LinuxSamplerPlugin::newLinuxSampler(const Initializer& init, bool isGIG)
CarlaPlugin* LinuxSamplerPlugin::newLinuxSampler(const Initializer& init, const bool isGIG, const bool use16Outs)
{
carla_debug("LinuxSamplerPlugin::newLinuxSampler({%p, \"%s\", \"%s\", \"%s\"}, %s)", init.engine, init.filename, init.name, init.label, bool2str(isGIG));
carla_debug("LinuxSamplerPlugin::newLinuxSampler({%p, \"%s\", \"%s\", \"%s\"}, %s, %s)", init.engine, init.filename, init.name, init.label, bool2str(isGIG), bool2str(use16Outs));

LinuxSamplerPlugin* const plugin = new LinuxSamplerPlugin(init.engine, init.id, isGIG);
LinuxSamplerPlugin* const plugin = new LinuxSamplerPlugin(init.engine, init.id, isGIG, use16Outs);

if (! plugin->init(init.filename, init.name, init.label))
{
@@ -1035,22 +1038,22 @@ CARLA_BACKEND_END_NAMESPACE

CARLA_BACKEND_START_NAMESPACE

CarlaPlugin* CarlaPlugin::newGIG(const Initializer& init)
CarlaPlugin* CarlaPlugin::newGIG(const Initializer& init, const bool use16Outs)
{
carla_debug("CarlaPlugin::newGIG({%p, \"%s\", \"%s\", \"%s\"})", init.engine, init.filename, init.name, init.label);
carla_debug("CarlaPlugin::newGIG({%p, \"%s\", \"%s\", \"%s\"}, %s)", init.engine, init.filename, init.name, init.label, bool2str(use16Outs));
#ifdef WANT_LINUXSAMPLER
return LinuxSamplerPlugin::newLinuxSampler(init, true);
return LinuxSamplerPlugin::newLinuxSampler(init, true, use16Outs);
#else
init.engine->setLastError("linuxsampler support not available");
return nullptr;
#endif
}

CarlaPlugin* CarlaPlugin::newSFZ(const Initializer& init)
CarlaPlugin* CarlaPlugin::newSFZ(const Initializer& init, const bool use16Outs)
{
carla_debug("CarlaPlugin::newSFZ({%p, \"%s\", \"%s\", \"%s\"})", init.engine, init.filename, init.name, init.label);
carla_debug("CarlaPlugin::newSFZ({%p, \"%s\", \"%s\", \"%s\"}, %s)", init.engine, init.filename, init.name, init.label, bool2str(use16Outs));
#ifdef WANT_LINUXSAMPLER
return LinuxSamplerPlugin::newLinuxSampler(init, false);
return LinuxSamplerPlugin::newLinuxSampler(init, false, use16Outs);
#else
init.engine->setLastError("linuxsampler support not available");
return nullptr;


+ 0
- 2
source/backend/plugin/Lv2Plugin.cpp View File

@@ -4678,8 +4678,6 @@ CarlaPlugin* CarlaPlugin::newLV2(const Initializer& init)
return nullptr;
}

//plugin->updateUi();

return plugin;
#else
init.engine->setLastError("LV2 support not available");


Loading…
Cancel
Save