@@ -735,7 +735,7 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState) | |||||
// --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
// Part 5x - set lv2 state | // Part 5x - set lv2 state | ||||
if (getType() == PLUGIN_LV2) | |||||
if (getType() == PLUGIN_LV2 && pData->custom.count() > 0) | |||||
setCustomData(CUSTOM_DATA_TYPE_STRING, "CarlaLoadLv2StateNow", "true", true); | setCustomData(CUSTOM_DATA_TYPE_STRING, "CarlaLoadLv2StateNow", "true", true); | ||||
// --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
@@ -1694,8 +1694,11 @@ bool CarlaPlugin::waitForOscGuiShow() | |||||
osc_send_show(pData->osc.data); | osc_send_show(pData->osc.data); | ||||
return true; | return true; | ||||
} | } | ||||
else | |||||
if (pData->osc.thread.isRunning()) | |||||
carla_msleep(100); | carla_msleep(100); | ||||
else | |||||
return false; | |||||
} | } | ||||
carla_stdout("CarlaPlugin::waitForOscGuiShow() - Timeout while waiting for UI to respond (waited %u msecs)", oscUiTimeout); | carla_stdout("CarlaPlugin::waitForOscGuiShow() - Timeout while waiting for UI to respond (waited %u msecs)", oscUiTimeout); | ||||
@@ -242,19 +242,13 @@ void CarlaPluginThread::run() | |||||
{ | { | ||||
carla_stdout("CarlaPluginThread::run() - UI auto-closed successfully"); | carla_stdout("CarlaPluginThread::run() - UI auto-closed successfully"); | ||||
} | } | ||||
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), 0, 0, 0.0f, nullptr); | |||||
} | } | ||||
else if (fProcess->exitCode() != 0 || fProcess->exitStatus() == QProcess::CrashExit) | else if (fProcess->exitCode() != 0 || fProcess->exitStatus() == QProcess::CrashExit) | ||||
{ | |||||
carla_stderr("CarlaPluginThread::run() - UI crashed while running"); | carla_stderr("CarlaPluginThread::run() - UI crashed while running"); | ||||
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), -1, 0, 0.0f, nullptr); | |||||
} | |||||
else | else | ||||
{ | |||||
carla_stdout("CarlaPluginThread::run() - UI closed cleanly"); | carla_stdout("CarlaPluginThread::run() - UI closed cleanly"); | ||||
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), 0, 0, 0.0f, nullptr); | |||||
} | |||||
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), 0, 0, 0.0f, nullptr); | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
@@ -462,7 +462,11 @@ public: | |||||
if ((pData->options & PLUGIN_OPTION_FORCE_STEREO) != 0 && (aIns == 1 || aOuts == 1)) | if ((pData->options & PLUGIN_OPTION_FORCE_STEREO) != 0 && (aIns == 1 || aOuts == 1)) | ||||
{ | { | ||||
if (fHandle2 == nullptr) | if (fHandle2 == nullptr) | ||||
fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate); | |||||
{ | |||||
try { | |||||
fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate); | |||||
} catch(...) {} | |||||
} | |||||
if (fHandle2 != nullptr) | if (fHandle2 != nullptr) | ||||
{ | { | ||||
@@ -1882,7 +1886,9 @@ public: | |||||
// --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
// initialize plugin | // initialize plugin | ||||
fHandle = fDescriptor->instantiate(fDescriptor, (unsigned long)pData->engine->getSampleRate()); | |||||
try { | |||||
fHandle = fDescriptor->instantiate(fDescriptor, (unsigned long)pData->engine->getSampleRate()); | |||||
} catch(...) {} | |||||
if (fHandle == nullptr) | if (fHandle == nullptr) | ||||
{ | { | ||||
@@ -449,7 +449,11 @@ public: | |||||
if ((pData->options & PLUGIN_OPTION_FORCE_STEREO) != 0 && (aIns == 1 || aOuts == 1)) | if ((pData->options & PLUGIN_OPTION_FORCE_STEREO) != 0 && (aIns == 1 || aOuts == 1)) | ||||
{ | { | ||||
if (fHandle2 == nullptr) | if (fHandle2 == nullptr) | ||||
fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate); | |||||
{ | |||||
try { | |||||
fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate); | |||||
} catch(...) {} | |||||
} | |||||
if (fHandle2 != nullptr) | if (fHandle2 != nullptr) | ||||
{ | { | ||||
@@ -1419,7 +1423,9 @@ public: | |||||
// --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
// initialize plugin | // initialize plugin | ||||
fHandle = fDescriptor->instantiate(fDescriptor, (unsigned long)pData->engine->getSampleRate()); | |||||
try { | |||||
fHandle = fDescriptor->instantiate(fDescriptor, (unsigned long)pData->engine->getSampleRate()); | |||||
} catch(...) {} | |||||
if (fHandle == nullptr) | if (fHandle == nullptr) | ||||
{ | { | ||||
@@ -16,8 +16,8 @@ | |||||
*/ | */ | ||||
// testing macros | // testing macros | ||||
//#define LV2_UIS_ONLY_BRIDGES | |||||
//#define LV2_UIS_ONLY_INPROCESS | |||||
// #define LV2_UIS_ONLY_BRIDGES | |||||
// #define LV2_UIS_ONLY_INPROCESS | |||||
#include "CarlaPluginInternal.hpp" | #include "CarlaPluginInternal.hpp" | ||||
#include "CarlaEngine.hpp" | #include "CarlaEngine.hpp" | ||||
@@ -76,43 +76,46 @@ const uint32_t CARLA_URI_MAP_ID_ATOM_BLANK = 1; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_BOOL = 2; | const uint32_t CARLA_URI_MAP_ID_ATOM_BOOL = 2; | ||||
const uint32_t CARLA_URI_MAP_ID_ATOM_CHUNK = 3; | const uint32_t CARLA_URI_MAP_ID_ATOM_CHUNK = 3; | ||||
const uint32_t CARLA_URI_MAP_ID_ATOM_DOUBLE = 4; | const uint32_t CARLA_URI_MAP_ID_ATOM_DOUBLE = 4; | ||||
const uint32_t CARLA_URI_MAP_ID_ATOM_FLOAT = 5; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_INT = 6; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_LITERAL = 7; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_LONG = 8; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_PATH = 9; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_OBJECT = 10; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_PROPERTY = 11; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_RESOURCE = 12; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_SEQUENCE = 13; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_STRING = 14; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TUPLE = 15; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_URI = 16; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_URID = 17; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_VECTOR = 18; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_WORKER = 19; // custom | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TRANSFER_ATOM = 20; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TRANSFER_EVENT = 21; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_MAX_LENGTH = 22; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_MIN_LENGTH = 23; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_SEQUENCE_SIZE = 24; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_ERROR = 25; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_NOTE = 26; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_TRACE = 27; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_WARNING = 28; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_POSITION = 29; // base type | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BAR = 30; // values | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BAR_BEAT = 31; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEAT = 32; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEAT_UNIT = 33; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEATS_PER_BAR = 34; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEATS_PER_MINUTE = 35; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_FRAME = 36; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_FRAMES_PER_SECOND = 37; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_SPEED = 38; | |||||
const uint32_t CARLA_URI_MAP_ID_MIDI_EVENT = 39; | |||||
const uint32_t CARLA_URI_MAP_ID_PARAM_SAMPLE_RATE = 40; | |||||
const uint32_t CARLA_URI_MAP_ID_COUNT = 41; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_EVENT = 5; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_FLOAT = 6; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_INT = 7; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_LITERAL = 8; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_LONG = 9; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_NUMBER = 10; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_OBJECT = 11; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_PATH = 12; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_PROPERTY = 13; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_RESOURCE = 14; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_SEQUENCE = 15; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_SOUND = 16; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_STRING = 17; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TUPLE = 18; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_URI = 19; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_URID = 20; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_VECTOR = 21; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_WORKER = 22; // custom | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TRANSFER_ATOM = 23; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TRANSFER_EVENT = 24; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_MAX_LENGTH = 25; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_MIN_LENGTH = 26; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_SEQUENCE_SIZE = 27; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_ERROR = 28; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_NOTE = 29; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_TRACE = 30; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_WARNING = 31; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_POSITION = 32; // base type | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BAR = 33; // values | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BAR_BEAT = 34; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEAT = 35; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEAT_UNIT = 36; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEATS_PER_BAR = 37; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEATS_PER_MINUTE = 38; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_FRAME = 39; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_FRAMES_PER_SECOND = 40; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_SPEED = 41; | |||||
const uint32_t CARLA_URI_MAP_ID_MIDI_EVENT = 42; | |||||
const uint32_t CARLA_URI_MAP_ID_PARAM_SAMPLE_RATE = 43; | |||||
const uint32_t CARLA_URI_MAP_ID_COUNT = 44; | |||||
// LV2 Feature Ids | // LV2 Feature Ids | ||||
const uint32_t kFeatureIdBufSizeBounded = 0; | const uint32_t kFeatureIdBufSizeBounded = 0; | ||||
@@ -1364,7 +1367,11 @@ public: | |||||
if ((pData->options & PLUGIN_OPTION_FORCE_STEREO) != 0 && (aIns == 1 || aOuts == 1) && fExt.state == nullptr && fExt.worker == nullptr) | if ((pData->options & PLUGIN_OPTION_FORCE_STEREO) != 0 && (aIns == 1 || aOuts == 1) && fExt.state == nullptr && fExt.worker == nullptr) | ||||
{ | { | ||||
if (fHandle2 == nullptr) | if (fHandle2 == nullptr) | ||||
fHandle2 = fDescriptor->instantiate(fDescriptor, sampleRate, fRdfDescriptor->Bundle, fFeatures); | |||||
{ | |||||
try { | |||||
fHandle2 = fDescriptor->instantiate(fDescriptor, sampleRate, fRdfDescriptor->Bundle, fFeatures); | |||||
} catch(...) {} | |||||
} | |||||
if (fHandle2 != nullptr) | if (fHandle2 != nullptr) | ||||
{ | { | ||||
@@ -4143,25 +4150,42 @@ public: | |||||
CARLA_SAFE_ASSERT_RETURN(rindex >= 0,); | CARLA_SAFE_ASSERT_RETURN(rindex >= 0,); | ||||
float paramValue; | |||||
switch (type) | switch (type) | ||||
{ | { | ||||
case CARLA_URI_MAP_ID_ATOM_BOOL: | |||||
CARLA_SAFE_ASSERT_RETURN(size == sizeof(bool),); | |||||
paramValue = (*(const bool*)value) ? 1.0f : 0.0f; | |||||
break; | |||||
case CARLA_URI_MAP_ID_ATOM_DOUBLE: | |||||
CARLA_SAFE_ASSERT_RETURN(size == sizeof(double),); | |||||
paramValue = static_cast<float>((*(const double*)value)); | |||||
break; | |||||
case CARLA_URI_MAP_ID_ATOM_FLOAT: | case CARLA_URI_MAP_ID_ATOM_FLOAT: | ||||
CARLA_SAFE_ASSERT_RETURN(size == sizeof(float),); | CARLA_SAFE_ASSERT_RETURN(size == sizeof(float),); | ||||
for (uint32_t i=0; i < pData->param.count; ++i) | |||||
{ | |||||
if (pData->param.data[i].rindex == rindex) | |||||
{ | |||||
const float valuef(*(const float*)value); | |||||
setParameterValue(i, valuef, true, true, true); | |||||
break; | |||||
} | |||||
} | |||||
paramValue = (*(const float*)value); | |||||
break; | |||||
case CARLA_URI_MAP_ID_ATOM_INT: | |||||
CARLA_SAFE_ASSERT_RETURN(size == sizeof(int32_t),); | |||||
paramValue = static_cast<float>((*(const int32_t*)value)); | |||||
break; | |||||
case CARLA_URI_MAP_ID_ATOM_LONG: | |||||
CARLA_SAFE_ASSERT_RETURN(size == sizeof(int64_t),); | |||||
paramValue = static_cast<float>((*(const int64_t*)value)); | |||||
break; | break; | ||||
default: | default: | ||||
carla_stdout("Lv2Plugin::handleLilvSetPortValue(\"%s\", %p, %i, %i:\"%s\") - unknown type", portSymbol, value, size, type, carla_lv2_urid_unmap(this, type)); | carla_stdout("Lv2Plugin::handleLilvSetPortValue(\"%s\", %p, %i, %i:\"%s\") - unknown type", portSymbol, value, size, type, carla_lv2_urid_unmap(this, type)); | ||||
break; | |||||
return; | |||||
} | |||||
for (uint32_t i=0; i < pData->param.count; ++i) | |||||
{ | |||||
if (pData->param.data[i].rindex == rindex) | |||||
{ | |||||
setParameterValue(i, paramValue, true, true, true); | |||||
break; | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -4468,7 +4492,9 @@ public: | |||||
// --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
// initialize plugin | // initialize plugin | ||||
fHandle = fDescriptor->instantiate(fDescriptor, pData->engine->getSampleRate(), fRdfDescriptor->Bundle, fFeatures); | |||||
try { | |||||
fHandle = fDescriptor->instantiate(fDescriptor, pData->engine->getSampleRate(), fRdfDescriptor->Bundle, fFeatures); | |||||
} catch(...) {} | |||||
if (fHandle == nullptr) | if (fHandle == nullptr) | ||||
{ | { | ||||
@@ -4861,9 +4887,18 @@ public: | |||||
CARLA_SAFE_ASSERT_RETURN(urid != CARLA_URI_MAP_ID_NULL,); | CARLA_SAFE_ASSERT_RETURN(urid != CARLA_URI_MAP_ID_NULL,); | ||||
CARLA_SAFE_ASSERT_RETURN(uri != nullptr && uri[0] != '\0',); | CARLA_SAFE_ASSERT_RETURN(uri != nullptr && uri[0] != '\0',); | ||||
carla_debug("Lv2Plugin::handleUridMap(%i v " P_SIZE ", \"%s\")", urid, fCustomURIDs.count(), uri); | carla_debug("Lv2Plugin::handleUridMap(%i v " P_SIZE ", \"%s\")", urid, fCustomURIDs.count(), uri); | ||||
CARLA_SAFE_ASSERT_RETURN(urid == fCustomURIDs.count(),); | |||||
fCustomURIDs.append(carla_strdup(uri)); | |||||
if (urid < fCustomURIDs.count()) | |||||
{ | |||||
const char* const ourURI(carla_lv2_urid_unmap(this, urid)); | |||||
CARLA_SAFE_ASSERT_RETURN(ourURI != nullptr,); | |||||
CARLA_SAFE_ASSERT(std::strcmp(ourURI, uri) == 0); | |||||
} | |||||
else | |||||
{ | |||||
CARLA_SAFE_ASSERT_RETURN(urid == fCustomURIDs.count(),); | |||||
fCustomURIDs.append(carla_strdup(uri)); | |||||
} | |||||
} | } | ||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
@@ -5140,6 +5175,8 @@ private: | |||||
return CARLA_URI_MAP_ID_ATOM_CHUNK; | return CARLA_URI_MAP_ID_ATOM_CHUNK; | ||||
if (std::strcmp(uri, LV2_ATOM__Double) == 0) | if (std::strcmp(uri, LV2_ATOM__Double) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_DOUBLE; | return CARLA_URI_MAP_ID_ATOM_DOUBLE; | ||||
if (std::strcmp(uri, LV2_ATOM__Event) == 0) | |||||
return CARLA_URI_MAP_ID_ATOM_EVENT; | |||||
if (std::strcmp(uri, LV2_ATOM__Float) == 0) | if (std::strcmp(uri, LV2_ATOM__Float) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_FLOAT; | return CARLA_URI_MAP_ID_ATOM_FLOAT; | ||||
if (std::strcmp(uri, LV2_ATOM__Int) == 0) | if (std::strcmp(uri, LV2_ATOM__Int) == 0) | ||||
@@ -5148,6 +5185,8 @@ private: | |||||
return CARLA_URI_MAP_ID_ATOM_LITERAL; | return CARLA_URI_MAP_ID_ATOM_LITERAL; | ||||
if (std::strcmp(uri, LV2_ATOM__Long) == 0) | if (std::strcmp(uri, LV2_ATOM__Long) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_LONG; | return CARLA_URI_MAP_ID_ATOM_LONG; | ||||
if (std::strcmp(uri, LV2_ATOM__Number) == 0) | |||||
return CARLA_URI_MAP_ID_ATOM_NUMBER; | |||||
if (std::strcmp(uri, LV2_ATOM__Object) == 0) | if (std::strcmp(uri, LV2_ATOM__Object) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_OBJECT; | return CARLA_URI_MAP_ID_ATOM_OBJECT; | ||||
if (std::strcmp(uri, LV2_ATOM__Path) == 0) | if (std::strcmp(uri, LV2_ATOM__Path) == 0) | ||||
@@ -5158,6 +5197,8 @@ private: | |||||
return CARLA_URI_MAP_ID_ATOM_RESOURCE; | return CARLA_URI_MAP_ID_ATOM_RESOURCE; | ||||
if (std::strcmp(uri, LV2_ATOM__Sequence) == 0) | if (std::strcmp(uri, LV2_ATOM__Sequence) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_SEQUENCE; | return CARLA_URI_MAP_ID_ATOM_SEQUENCE; | ||||
if (std::strcmp(uri, LV2_ATOM__Sound) == 0) | |||||
return CARLA_URI_MAP_ID_ATOM_SOUND; | |||||
if (std::strcmp(uri, LV2_ATOM__String) == 0) | if (std::strcmp(uri, LV2_ATOM__String) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_STRING; | return CARLA_URI_MAP_ID_ATOM_STRING; | ||||
if (std::strcmp(uri, LV2_ATOM__Tuple) == 0) | if (std::strcmp(uri, LV2_ATOM__Tuple) == 0) | ||||
@@ -5238,6 +5279,8 @@ private: | |||||
return LV2_ATOM__Chunk; | return LV2_ATOM__Chunk; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_DOUBLE) | if (urid == CARLA_URI_MAP_ID_ATOM_DOUBLE) | ||||
return LV2_ATOM__Double; | return LV2_ATOM__Double; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_EVENT) | |||||
return LV2_ATOM__Event; | |||||
if (urid == CARLA_URI_MAP_ID_ATOM_FLOAT) | if (urid == CARLA_URI_MAP_ID_ATOM_FLOAT) | ||||
return LV2_ATOM__Float; | return LV2_ATOM__Float; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_INT) | if (urid == CARLA_URI_MAP_ID_ATOM_INT) | ||||
@@ -5246,6 +5289,8 @@ private: | |||||
return LV2_ATOM__Literal; | return LV2_ATOM__Literal; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_LONG) | if (urid == CARLA_URI_MAP_ID_ATOM_LONG) | ||||
return LV2_ATOM__Long; | return LV2_ATOM__Long; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_NUMBER) | |||||
return LV2_ATOM__Number; | |||||
if (urid == CARLA_URI_MAP_ID_ATOM_OBJECT) | if (urid == CARLA_URI_MAP_ID_ATOM_OBJECT) | ||||
return LV2_ATOM__Object; | return LV2_ATOM__Object; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_PATH) | if (urid == CARLA_URI_MAP_ID_ATOM_PATH) | ||||
@@ -5256,6 +5301,8 @@ private: | |||||
return LV2_ATOM__Resource; | return LV2_ATOM__Resource; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_SEQUENCE) | if (urid == CARLA_URI_MAP_ID_ATOM_SEQUENCE) | ||||
return LV2_ATOM__Sequence; | return LV2_ATOM__Sequence; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_SOUND) | |||||
return LV2_ATOM__Sound; | |||||
if (urid == CARLA_URI_MAP_ID_ATOM_STRING) | if (urid == CARLA_URI_MAP_ID_ATOM_STRING) | ||||
return LV2_ATOM__String; | return LV2_ATOM__String; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_TUPLE) | if (urid == CARLA_URI_MAP_ID_ATOM_TUPLE) | ||||
@@ -719,7 +719,7 @@ void carla_set_engine_option(EngineOption option, int value, const char* valueSt | |||||
break; | break; | ||||
case CB::ENGINE_OPTION_AUDIO_DEVICE: | case CB::ENGINE_OPTION_AUDIO_DEVICE: | ||||
CARLA_SAFE_ASSERT_RETURN(valueStr != nullptr && valueStr[0] != '\0',); | |||||
CARLA_SAFE_ASSERT_RETURN(valueStr != nullptr,); | |||||
if (gStandalone.engineOptions.audioDevice != nullptr) | if (gStandalone.engineOptions.audioDevice != nullptr) | ||||
delete[] gStandalone.engineOptions.audioDevice; | delete[] gStandalone.engineOptions.audioDevice; | ||||
@@ -46,43 +46,46 @@ const uint32_t CARLA_URI_MAP_ID_ATOM_BLANK = 1; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_BOOL = 2; | const uint32_t CARLA_URI_MAP_ID_ATOM_BOOL = 2; | ||||
const uint32_t CARLA_URI_MAP_ID_ATOM_CHUNK = 3; | const uint32_t CARLA_URI_MAP_ID_ATOM_CHUNK = 3; | ||||
const uint32_t CARLA_URI_MAP_ID_ATOM_DOUBLE = 4; | const uint32_t CARLA_URI_MAP_ID_ATOM_DOUBLE = 4; | ||||
const uint32_t CARLA_URI_MAP_ID_ATOM_FLOAT = 5; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_INT = 6; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_LITERAL = 7; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_LONG = 8; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_PATH = 9; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_OBJECT = 10; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_PROPERTY = 11; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_RESOURCE = 12; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_SEQUENCE = 13; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_STRING = 14; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TUPLE = 15; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_URI = 16; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_URID = 17; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_VECTOR = 18; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_WORKER = 19; // custom | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TRANSFER_ATOM = 20; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TRANSFER_EVENT = 21; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_MAX_LENGTH = 22; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_MIN_LENGTH = 23; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_SEQUENCE_SIZE = 24; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_ERROR = 25; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_NOTE = 26; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_TRACE = 27; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_WARNING = 28; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_POSITION = 29; // base type | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BAR = 30; // values | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BAR_BEAT = 31; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEAT = 32; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEAT_UNIT = 33; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEATS_PER_BAR = 34; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEATS_PER_MINUTE = 35; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_FRAME = 36; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_FRAMES_PER_SECOND = 37; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_SPEED = 38; | |||||
const uint32_t CARLA_URI_MAP_ID_MIDI_EVENT = 39; | |||||
const uint32_t CARLA_URI_MAP_ID_PARAM_SAMPLE_RATE = 40; | |||||
const uint32_t CARLA_URI_MAP_ID_COUNT = 41; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_EVENT = 5; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_FLOAT = 6; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_INT = 7; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_LITERAL = 8; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_LONG = 9; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_NUMBER = 10; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_OBJECT = 11; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_PATH = 12; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_PROPERTY = 13; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_RESOURCE = 14; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_SEQUENCE = 15; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_SOUND = 16; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_STRING = 17; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TUPLE = 18; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_URI = 19; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_URID = 20; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_VECTOR = 21; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_WORKER = 22; // custom | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TRANSFER_ATOM = 23; | |||||
const uint32_t CARLA_URI_MAP_ID_ATOM_TRANSFER_EVENT = 24; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_MAX_LENGTH = 25; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_MIN_LENGTH = 26; | |||||
const uint32_t CARLA_URI_MAP_ID_BUF_SEQUENCE_SIZE = 27; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_ERROR = 28; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_NOTE = 29; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_TRACE = 30; | |||||
const uint32_t CARLA_URI_MAP_ID_LOG_WARNING = 31; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_POSITION = 32; // base type | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BAR = 33; // values | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BAR_BEAT = 34; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEAT = 35; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEAT_UNIT = 36; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEATS_PER_BAR = 37; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_BEATS_PER_MINUTE = 38; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_FRAME = 39; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_FRAMES_PER_SECOND = 40; | |||||
const uint32_t CARLA_URI_MAP_ID_TIME_SPEED = 41; | |||||
const uint32_t CARLA_URI_MAP_ID_MIDI_EVENT = 42; | |||||
const uint32_t CARLA_URI_MAP_ID_PARAM_SAMPLE_RATE = 43; | |||||
const uint32_t CARLA_URI_MAP_ID_COUNT = 44; | |||||
// LV2 Feature Ids | // LV2 Feature Ids | ||||
const uint32_t kFeatureIdLogs = 0; | const uint32_t kFeatureIdLogs = 0; | ||||
@@ -849,6 +852,8 @@ private: | |||||
return CARLA_URI_MAP_ID_ATOM_CHUNK; | return CARLA_URI_MAP_ID_ATOM_CHUNK; | ||||
if (std::strcmp(uri, LV2_ATOM__Double) == 0) | if (std::strcmp(uri, LV2_ATOM__Double) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_DOUBLE; | return CARLA_URI_MAP_ID_ATOM_DOUBLE; | ||||
if (std::strcmp(uri, LV2_ATOM__Event) == 0) | |||||
return CARLA_URI_MAP_ID_ATOM_EVENT; | |||||
if (std::strcmp(uri, LV2_ATOM__Float) == 0) | if (std::strcmp(uri, LV2_ATOM__Float) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_FLOAT; | return CARLA_URI_MAP_ID_ATOM_FLOAT; | ||||
if (std::strcmp(uri, LV2_ATOM__Int) == 0) | if (std::strcmp(uri, LV2_ATOM__Int) == 0) | ||||
@@ -857,6 +862,8 @@ private: | |||||
return CARLA_URI_MAP_ID_ATOM_LITERAL; | return CARLA_URI_MAP_ID_ATOM_LITERAL; | ||||
if (std::strcmp(uri, LV2_ATOM__Long) == 0) | if (std::strcmp(uri, LV2_ATOM__Long) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_LONG; | return CARLA_URI_MAP_ID_ATOM_LONG; | ||||
if (std::strcmp(uri, LV2_ATOM__Number) == 0) | |||||
return CARLA_URI_MAP_ID_ATOM_NUMBER; | |||||
if (std::strcmp(uri, LV2_ATOM__Object) == 0) | if (std::strcmp(uri, LV2_ATOM__Object) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_OBJECT; | return CARLA_URI_MAP_ID_ATOM_OBJECT; | ||||
if (std::strcmp(uri, LV2_ATOM__Path) == 0) | if (std::strcmp(uri, LV2_ATOM__Path) == 0) | ||||
@@ -867,6 +874,8 @@ private: | |||||
return CARLA_URI_MAP_ID_ATOM_RESOURCE; | return CARLA_URI_MAP_ID_ATOM_RESOURCE; | ||||
if (std::strcmp(uri, LV2_ATOM__Sequence) == 0) | if (std::strcmp(uri, LV2_ATOM__Sequence) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_SEQUENCE; | return CARLA_URI_MAP_ID_ATOM_SEQUENCE; | ||||
if (std::strcmp(uri, LV2_ATOM__Sound) == 0) | |||||
return CARLA_URI_MAP_ID_ATOM_SOUND; | |||||
if (std::strcmp(uri, LV2_ATOM__String) == 0) | if (std::strcmp(uri, LV2_ATOM__String) == 0) | ||||
return CARLA_URI_MAP_ID_ATOM_STRING; | return CARLA_URI_MAP_ID_ATOM_STRING; | ||||
if (std::strcmp(uri, LV2_ATOM__Tuple) == 0) | if (std::strcmp(uri, LV2_ATOM__Tuple) == 0) | ||||
@@ -947,6 +956,8 @@ private: | |||||
return LV2_ATOM__Chunk; | return LV2_ATOM__Chunk; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_DOUBLE) | if (urid == CARLA_URI_MAP_ID_ATOM_DOUBLE) | ||||
return LV2_ATOM__Double; | return LV2_ATOM__Double; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_EVENT) | |||||
return LV2_ATOM__Event; | |||||
if (urid == CARLA_URI_MAP_ID_ATOM_FLOAT) | if (urid == CARLA_URI_MAP_ID_ATOM_FLOAT) | ||||
return LV2_ATOM__Float; | return LV2_ATOM__Float; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_INT) | if (urid == CARLA_URI_MAP_ID_ATOM_INT) | ||||
@@ -955,6 +966,8 @@ private: | |||||
return LV2_ATOM__Literal; | return LV2_ATOM__Literal; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_LONG) | if (urid == CARLA_URI_MAP_ID_ATOM_LONG) | ||||
return LV2_ATOM__Long; | return LV2_ATOM__Long; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_NUMBER) | |||||
return LV2_ATOM__Number; | |||||
if (urid == CARLA_URI_MAP_ID_ATOM_OBJECT) | if (urid == CARLA_URI_MAP_ID_ATOM_OBJECT) | ||||
return LV2_ATOM__Object; | return LV2_ATOM__Object; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_PATH) | if (urid == CARLA_URI_MAP_ID_ATOM_PATH) | ||||
@@ -965,6 +978,8 @@ private: | |||||
return LV2_ATOM__Resource; | return LV2_ATOM__Resource; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_SEQUENCE) | if (urid == CARLA_URI_MAP_ID_ATOM_SEQUENCE) | ||||
return LV2_ATOM__Sequence; | return LV2_ATOM__Sequence; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_SOUND) | |||||
return LV2_ATOM__Sound; | |||||
if (urid == CARLA_URI_MAP_ID_ATOM_STRING) | if (urid == CARLA_URI_MAP_ID_ATOM_STRING) | ||||
return LV2_ATOM__String; | return LV2_ATOM__String; | ||||
if (urid == CARLA_URI_MAP_ID_ATOM_TUPLE) | if (urid == CARLA_URI_MAP_ID_ATOM_TUPLE) | ||||