From 3d02cbfad3f9a4fd2f2302f679aa185beb3d7550 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 7 Feb 2014 11:04:09 +0000 Subject: [PATCH] More LV2 work --- source/backend/plugin/CarlaPlugin.cpp | 7 +- source/backend/plugin/CarlaPluginThread.cpp | 10 +- source/backend/plugin/DssiPlugin.cpp | 10 +- source/backend/plugin/LadspaPlugin.cpp | 10 +- source/backend/plugin/Lv2Plugin.cpp | 157 ++++++++++++------ source/backend/standalone/CarlaStandalone.cpp | 2 +- source/bridges/CarlaBridgeUI-LV2.cpp | 89 +++++----- 7 files changed, 178 insertions(+), 107 deletions(-) diff --git a/source/backend/plugin/CarlaPlugin.cpp b/source/backend/plugin/CarlaPlugin.cpp index 1caead1cc..70677defd 100644 --- a/source/backend/plugin/CarlaPlugin.cpp +++ b/source/backend/plugin/CarlaPlugin.cpp @@ -735,7 +735,7 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState) // --------------------------------------------------------------- // 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); // --------------------------------------------------------------- @@ -1694,8 +1694,11 @@ bool CarlaPlugin::waitForOscGuiShow() osc_send_show(pData->osc.data); return true; } - else + + if (pData->osc.thread.isRunning()) carla_msleep(100); + else + return false; } carla_stdout("CarlaPlugin::waitForOscGuiShow() - Timeout while waiting for UI to respond (waited %u msecs)", oscUiTimeout); diff --git a/source/backend/plugin/CarlaPluginThread.cpp b/source/backend/plugin/CarlaPluginThread.cpp index b86eddcf4..fe5b1d30e 100644 --- a/source/backend/plugin/CarlaPluginThread.cpp +++ b/source/backend/plugin/CarlaPluginThread.cpp @@ -242,19 +242,13 @@ void CarlaPluginThread::run() { 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) - { carla_stderr("CarlaPluginThread::run() - UI crashed while running"); - fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), -1, 0, 0.0f, nullptr); - } else - { 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 { diff --git a/source/backend/plugin/DssiPlugin.cpp b/source/backend/plugin/DssiPlugin.cpp index e852bee75..e0680d7ad 100644 --- a/source/backend/plugin/DssiPlugin.cpp +++ b/source/backend/plugin/DssiPlugin.cpp @@ -462,7 +462,11 @@ public: if ((pData->options & PLUGIN_OPTION_FORCE_STEREO) != 0 && (aIns == 1 || aOuts == 1)) { if (fHandle2 == nullptr) - fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate); + { + try { + fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate); + } catch(...) {} + } if (fHandle2 != nullptr) { @@ -1882,7 +1886,9 @@ public: // --------------------------------------------------------------- // 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) { diff --git a/source/backend/plugin/LadspaPlugin.cpp b/source/backend/plugin/LadspaPlugin.cpp index 6920167de..22a433237 100644 --- a/source/backend/plugin/LadspaPlugin.cpp +++ b/source/backend/plugin/LadspaPlugin.cpp @@ -449,7 +449,11 @@ public: if ((pData->options & PLUGIN_OPTION_FORCE_STEREO) != 0 && (aIns == 1 || aOuts == 1)) { if (fHandle2 == nullptr) - fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate); + { + try { + fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate); + } catch(...) {} + } if (fHandle2 != nullptr) { @@ -1419,7 +1423,9 @@ public: // --------------------------------------------------------------- // 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) { diff --git a/source/backend/plugin/Lv2Plugin.cpp b/source/backend/plugin/Lv2Plugin.cpp index acdeabcb6..185fac828 100644 --- a/source/backend/plugin/Lv2Plugin.cpp +++ b/source/backend/plugin/Lv2Plugin.cpp @@ -16,8 +16,8 @@ */ // 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 "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_CHUNK = 3; 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 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 (fHandle2 == nullptr) - fHandle2 = fDescriptor->instantiate(fDescriptor, sampleRate, fRdfDescriptor->Bundle, fFeatures); + { + try { + fHandle2 = fDescriptor->instantiate(fDescriptor, sampleRate, fRdfDescriptor->Bundle, fFeatures); + } catch(...) {} + } if (fHandle2 != nullptr) { @@ -4143,25 +4150,42 @@ public: CARLA_SAFE_ASSERT_RETURN(rindex >= 0,); + float paramValue; + 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((*(const double*)value)); + break; case CARLA_URI_MAP_ID_ATOM_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((*(const int32_t*)value)); + break; + case CARLA_URI_MAP_ID_ATOM_LONG: + CARLA_SAFE_ASSERT_RETURN(size == sizeof(int64_t),); + paramValue = static_cast((*(const int64_t*)value)); break; - default: 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 - 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) { @@ -4861,9 +4887,18 @@ public: CARLA_SAFE_ASSERT_RETURN(urid != CARLA_URI_MAP_ID_NULL,); CARLA_SAFE_ASSERT_RETURN(uri != nullptr && uri[0] != '\0',); 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; if (std::strcmp(uri, LV2_ATOM__Double) == 0) 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) return CARLA_URI_MAP_ID_ATOM_FLOAT; if (std::strcmp(uri, LV2_ATOM__Int) == 0) @@ -5148,6 +5185,8 @@ private: return CARLA_URI_MAP_ID_ATOM_LITERAL; if (std::strcmp(uri, LV2_ATOM__Long) == 0) 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) return CARLA_URI_MAP_ID_ATOM_OBJECT; if (std::strcmp(uri, LV2_ATOM__Path) == 0) @@ -5158,6 +5197,8 @@ private: return CARLA_URI_MAP_ID_ATOM_RESOURCE; if (std::strcmp(uri, LV2_ATOM__Sequence) == 0) 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) return CARLA_URI_MAP_ID_ATOM_STRING; if (std::strcmp(uri, LV2_ATOM__Tuple) == 0) @@ -5238,6 +5279,8 @@ private: return LV2_ATOM__Chunk; if (urid == CARLA_URI_MAP_ID_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) return LV2_ATOM__Float; if (urid == CARLA_URI_MAP_ID_ATOM_INT) @@ -5246,6 +5289,8 @@ private: return LV2_ATOM__Literal; if (urid == CARLA_URI_MAP_ID_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) return LV2_ATOM__Object; if (urid == CARLA_URI_MAP_ID_ATOM_PATH) @@ -5256,6 +5301,8 @@ private: return LV2_ATOM__Resource; if (urid == CARLA_URI_MAP_ID_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) return LV2_ATOM__String; if (urid == CARLA_URI_MAP_ID_ATOM_TUPLE) diff --git a/source/backend/standalone/CarlaStandalone.cpp b/source/backend/standalone/CarlaStandalone.cpp index f5865e75a..378759f72 100644 --- a/source/backend/standalone/CarlaStandalone.cpp +++ b/source/backend/standalone/CarlaStandalone.cpp @@ -719,7 +719,7 @@ void carla_set_engine_option(EngineOption option, int value, const char* valueSt break; 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) delete[] gStandalone.engineOptions.audioDevice; diff --git a/source/bridges/CarlaBridgeUI-LV2.cpp b/source/bridges/CarlaBridgeUI-LV2.cpp index c67f8765a..6a46df3cf 100644 --- a/source/bridges/CarlaBridgeUI-LV2.cpp +++ b/source/bridges/CarlaBridgeUI-LV2.cpp @@ -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_CHUNK = 3; 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 const uint32_t kFeatureIdLogs = 0; @@ -849,6 +852,8 @@ private: return CARLA_URI_MAP_ID_ATOM_CHUNK; if (std::strcmp(uri, LV2_ATOM__Double) == 0) 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) return CARLA_URI_MAP_ID_ATOM_FLOAT; if (std::strcmp(uri, LV2_ATOM__Int) == 0) @@ -857,6 +862,8 @@ private: return CARLA_URI_MAP_ID_ATOM_LITERAL; if (std::strcmp(uri, LV2_ATOM__Long) == 0) 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) return CARLA_URI_MAP_ID_ATOM_OBJECT; if (std::strcmp(uri, LV2_ATOM__Path) == 0) @@ -867,6 +874,8 @@ private: return CARLA_URI_MAP_ID_ATOM_RESOURCE; if (std::strcmp(uri, LV2_ATOM__Sequence) == 0) 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) return CARLA_URI_MAP_ID_ATOM_STRING; if (std::strcmp(uri, LV2_ATOM__Tuple) == 0) @@ -947,6 +956,8 @@ private: return LV2_ATOM__Chunk; if (urid == CARLA_URI_MAP_ID_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) return LV2_ATOM__Float; if (urid == CARLA_URI_MAP_ID_ATOM_INT) @@ -955,6 +966,8 @@ private: return LV2_ATOM__Literal; if (urid == CARLA_URI_MAP_ID_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) return LV2_ATOM__Object; if (urid == CARLA_URI_MAP_ID_ATOM_PATH) @@ -965,6 +978,8 @@ private: return LV2_ATOM__Resource; if (urid == CARLA_URI_MAP_ID_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) return LV2_ATOM__String; if (urid == CARLA_URI_MAP_ID_ATOM_TUPLE)