| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -17,8 +17,8 @@ | |||
| #ifndef DGL_BASE_HPP_INCLUDED | |||
| #define DGL_BASE_HPP_INCLUDED | |||
| #include "../distrho/extra/d_leakdetector.hpp" | |||
| #include "../distrho/extra/d_scopedpointer.hpp" | |||
| #include "../distrho/extra/LeakDetector.hpp" | |||
| #include "../distrho/extra/ScopedPointer.hpp" | |||
| // ----------------------------------------------------------------------- | |||
| // Define namespace | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -18,7 +18,7 @@ | |||
| #define DGL_APP_PRIVATE_DATA_HPP_INCLUDED | |||
| #include "../App.hpp" | |||
| #include "../../distrho/extra/d_sleep.hpp" | |||
| #include "../../distrho/extra/Sleep.hpp" | |||
| #include <list> | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -20,7 +20,7 @@ | |||
| #include "AppPrivateData.hpp" | |||
| #include "../Widget.hpp" | |||
| #include "../Window.hpp" | |||
| #include "../../distrho/extra/d_string.hpp" | |||
| #include "../../distrho/extra/String.hpp" | |||
| #undef PUGL_HAVE_CAIRO | |||
| #undef PUGL_HAVE_GL | |||
| @@ -1028,7 +1028,7 @@ void Window::repaint() noexcept | |||
| bool Window::openFileBrowser(const FileBrowserOptions& options) | |||
| { | |||
| #ifdef SOFD_HAVE_X11 | |||
| using DISTRHO_NAMESPACE::d_string; | |||
| using DISTRHO_NAMESPACE::String; | |||
| // -------------------------------------------------------------------------- | |||
| // configure start dir | |||
| @@ -1036,7 +1036,7 @@ bool Window::openFileBrowser(const FileBrowserOptions& options) | |||
| // TODO: get abspath if needed | |||
| // TODO: cross-platform | |||
| d_string startDir(options.startDir); | |||
| String startDir(options.startDir); | |||
| if (startDir.isEmpty()) | |||
| { | |||
| @@ -1057,7 +1057,7 @@ bool Window::openFileBrowser(const FileBrowserOptions& options) | |||
| // -------------------------------------------------------------------------- | |||
| // configure title | |||
| d_string title(options.title); | |||
| String title(options.title); | |||
| if (title.isEmpty()) | |||
| { | |||
| @@ -337,7 +337,7 @@ START_NAMESPACE_DISTRHO | |||
| Set the name of the program @a index. | |||
| This function will be called once, shortly after the plugin is created. | |||
| */ | |||
| void initProgramName(uint32_t index, d_string& programName) | |||
| void initProgramName(uint32_t index, String& programName) | |||
| { | |||
| switch(index) | |||
| { | |||
| @@ -166,7 +166,7 @@ struct ParameterRanges { | |||
| /** | |||
| Constructor using custom values. | |||
| */ | |||
| ParameterRanges(const float df, const float mn, const float mx) noexcept | |||
| ParameterRanges(float df, float mn, float mx) noexcept | |||
| : def(df), | |||
| min(mn), | |||
| max(mx) {} | |||
| @@ -468,7 +468,7 @@ public: | |||
| Plugin class constructor.@n | |||
| You must set all parameter values to their defaults, matching ParameterRanges::def. | |||
| */ | |||
| Plugin(const uint32_t parameterCount, const uint32_t programCount, const uint32_t stateCount); | |||
| Plugin(uint32_t parameterCount, uint32_t programCount, uint32_t stateCount); | |||
| /** | |||
| Destructor. | |||
| @@ -71,25 +71,25 @@ public: | |||
| /** | |||
| TODO: Document this. | |||
| */ | |||
| void editParameter(const uint32_t index, const bool started); | |||
| void editParameter(uint32_t index, bool started); | |||
| /** | |||
| TODO: Document this. | |||
| */ | |||
| void setParameterValue(const uint32_t index, const float value); | |||
| void setParameterValue(uint32_t index, float value); | |||
| #if DISTRHO_PLUGIN_WANT_STATE | |||
| /** | |||
| TODO: Document this. | |||
| */ | |||
| void setState(const char* const key, const char* const value); | |||
| void setState(const char* key, const char* value); | |||
| #endif | |||
| #if DISTRHO_PLUGIN_IS_SYNTH | |||
| /** | |||
| TODO: Document this. | |||
| */ | |||
| void sendNote(const uint8_t channel, const uint8_t note, const uint8_t velocity); | |||
| void sendNote(uint8_t channel, uint8_t note, uint8_t velocity); | |||
| #endif | |||
| #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS | |||
| @@ -114,10 +114,10 @@ protected: | |||
| #if DISTRHO_PLUGIN_WANT_PROGRAMS | |||
| /** | |||
| The current program has changed on the plugin side. | |||
| A program has been loaded on the plugin side. | |||
| This is called by the host to inform the UI about program changes. | |||
| */ | |||
| virtual void programChanged(uint32_t index) = 0; | |||
| virtual void programLoaded(uint32_t index) = 0; | |||
| #endif | |||
| #if DISTRHO_PLUGIN_WANT_STATE | |||
| @@ -17,9 +17,9 @@ | |||
| #ifndef DISTRHO_THREAD_HPP_INCLUDED | |||
| #define DISTRHO_THREAD_HPP_INCLUDED | |||
| #include "d_mutex.hpp" | |||
| #include "d_sleep.hpp" | |||
| #include "d_string.hpp" | |||
| #include "Mutex.hpp" | |||
| #include "Sleep.hpp" | |||
| #include "String.hpp" | |||
| #ifdef DISTRHO_OS_LINUX | |||
| # include <sys/prctl.h> | |||
| @@ -34,7 +34,7 @@ const ParameterRanges PluginExporter::sFallbackRanges; | |||
| /* ------------------------------------------------------------------------------------------------------------ | |||
| * Plugin */ | |||
| Plugin::Plugin(const uint32_t parameterCount, const uint32_t programCount, const uint32_t stateCount) | |||
| Plugin::Plugin(uint32_t parameterCount, uint32_t programCount, uint32_t stateCount) | |||
| : pData(new PrivateData()) | |||
| { | |||
| #if DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS > 0 | |||
| @@ -95,7 +95,7 @@ const TimePosition& Plugin::getTimePosition() const noexcept | |||
| #endif | |||
| #if DISTRHO_PLUGIN_WANT_LATENCY | |||
| void Plugin::setLatency(const uint32_t frames) noexcept | |||
| void Plugin::setLatency(uint32_t frames) noexcept | |||
| { | |||
| pData->latency = frames; | |||
| } | |||
| @@ -46,14 +46,14 @@ struct Plugin::PrivateData { | |||
| Parameter* parameters; | |||
| #if DISTRHO_PLUGIN_WANT_PROGRAMS | |||
| uint32_t programCount; | |||
| d_string* programNames; | |||
| uint32_t programCount; | |||
| String* programNames; | |||
| #endif | |||
| #if DISTRHO_PLUGIN_WANT_STATE | |||
| uint32_t stateCount; | |||
| d_string* stateKeys; | |||
| d_string* stateDefValues; | |||
| uint32_t stateCount; | |||
| String* stateKeys; | |||
| String* stateDefValues; | |||
| #endif | |||
| #if DISTRHO_PLUGIN_WANT_LATENCY | |||
| @@ -151,23 +151,23 @@ public: | |||
| { | |||
| uint32_t j=0; | |||
| for (uint32_t i=0; i < DISTRHO_PLUGIN_NUM_INPUTS; ++i, ++j) | |||
| fPlugin->d_initAudioPort(true, i, fData->audioPorts[j]); | |||
| fPlugin->initAudioPort(true, i, fData->audioPorts[j]); | |||
| for (uint32_t i=0; i < DISTRHO_PLUGIN_NUM_OUTPUTS; ++i, ++j) | |||
| fPlugin->d_initAudioPort(false, i, fData->audioPorts[j]); | |||
| fPlugin->initAudioPort(false, i, fData->audioPorts[j]); | |||
| } | |||
| #endif | |||
| for (uint32_t i=0, count=fData->parameterCount; i < count; ++i) | |||
| fPlugin->d_initParameter(i, fData->parameters[i]); | |||
| fPlugin->initParameter(i, fData->parameters[i]); | |||
| #if DISTRHO_PLUGIN_WANT_PROGRAMS | |||
| for (uint32_t i=0, count=fData->programCount; i < count; ++i) | |||
| fPlugin->d_initProgramName(i, fData->programNames[i]); | |||
| fPlugin->initProgramName(i, fData->programNames[i]); | |||
| #endif | |||
| #if DISTRHO_PLUGIN_WANT_STATE | |||
| for (uint32_t i=0, count=fData->stateCount; i < count; ++i) | |||
| fPlugin->d_initState(i, fData->stateKeys[i], fData->stateDefValues[i]); | |||
| fPlugin->initState(i, fData->stateKeys[i], fData->stateDefValues[i]); | |||
| #endif | |||
| } | |||
| @@ -182,42 +182,42 @@ public: | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr, ""); | |||
| return fPlugin->d_getName(); | |||
| return fPlugin->getName(); | |||
| } | |||
| const char* getLabel() const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr, ""); | |||
| return fPlugin->d_getLabel(); | |||
| return fPlugin->getLabel(); | |||
| } | |||
| const char* getMaker() const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr, ""); | |||
| return fPlugin->d_getMaker(); | |||
| return fPlugin->getMaker(); | |||
| } | |||
| const char* getLicense() const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr, ""); | |||
| return fPlugin->d_getLicense(); | |||
| return fPlugin->getLicense(); | |||
| } | |||
| uint32_t getVersion() const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr, 0); | |||
| return fPlugin->d_getVersion(); | |||
| return fPlugin->getVersion(); | |||
| } | |||
| long getUniqueId() const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr, 0); | |||
| return fPlugin->d_getUniqueId(); | |||
| return fPlugin->getUniqueId(); | |||
| } | |||
| void* getInstancePointer() const noexcept | |||
| @@ -270,21 +270,21 @@ public: | |||
| return (getParameterHints(index) & kParameterIsOutput); | |||
| } | |||
| const d_string& getParameterName(const uint32_t index) const noexcept | |||
| const String& getParameterName(const uint32_t index) const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->parameterCount, sFallbackString); | |||
| return fData->parameters[index].name; | |||
| } | |||
| const d_string& getParameterSymbol(const uint32_t index) const noexcept | |||
| const String& getParameterSymbol(const uint32_t index) const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->parameterCount, sFallbackString); | |||
| return fData->parameters[index].symbol; | |||
| } | |||
| const d_string& getParameterUnit(const uint32_t index) const noexcept | |||
| const String& getParameterUnit(const uint32_t index) const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->parameterCount, sFallbackString); | |||
| @@ -303,7 +303,7 @@ public: | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr, 0.0f); | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->parameterCount, 0.0f); | |||
| return fPlugin->d_getParameterValue(index); | |||
| return fPlugin->getParameterValue(index); | |||
| } | |||
| void setParameterValue(const uint32_t index, const float value) | |||
| @@ -311,7 +311,7 @@ public: | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr,); | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->parameterCount,); | |||
| fPlugin->d_setParameterValue(index, value); | |||
| fPlugin->setParameterValue(index, value); | |||
| } | |||
| #if DISTRHO_PLUGIN_WANT_PROGRAMS | |||
| @@ -322,19 +322,19 @@ public: | |||
| return fData->programCount; | |||
| } | |||
| const d_string& getProgramName(const uint32_t index) const noexcept | |||
| const String& getProgramName(const uint32_t index) const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->programCount, sFallbackString); | |||
| return fData->programNames[index]; | |||
| } | |||
| void setProgram(const uint32_t index) | |||
| void loadProgram(const uint32_t index) | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr,); | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->programCount,); | |||
| fPlugin->d_setProgram(index); | |||
| fPlugin->loadProgram(index); | |||
| } | |||
| #endif | |||
| @@ -346,14 +346,14 @@ public: | |||
| return fData->stateCount; | |||
| } | |||
| const d_string& getStateKey(const uint32_t index) const noexcept | |||
| const String& getStateKey(const uint32_t index) const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->stateCount, sFallbackString); | |||
| return fData->stateKeys[index]; | |||
| } | |||
| const d_string& getStateDefaultValue(const uint32_t index) const noexcept | |||
| const String& getStateDefaultValue(const uint32_t index) const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->stateCount, sFallbackString); | |||
| @@ -366,7 +366,7 @@ public: | |||
| DISTRHO_SAFE_ASSERT_RETURN(key != nullptr && key[0] != '\0',); | |||
| DISTRHO_SAFE_ASSERT_RETURN(value != nullptr,); | |||
| fPlugin->d_setState(key, value); | |||
| fPlugin->setState(key, value); | |||
| } | |||
| bool wantStateKey(const char* const key) const noexcept | |||
| @@ -400,7 +400,7 @@ public: | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr,); | |||
| fIsActive = true; | |||
| fPlugin->d_activate(); | |||
| fPlugin->activate(); | |||
| } | |||
| void deactivate() | |||
| @@ -408,7 +408,7 @@ public: | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr,); | |||
| fIsActive = false; | |||
| fPlugin->d_deactivate(); | |||
| fPlugin->deactivate(); | |||
| } | |||
| #if DISTRHO_PLUGIN_IS_SYNTH | |||
| @@ -419,7 +419,7 @@ public: | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr,); | |||
| fData->isProcessing = true; | |||
| fPlugin->d_run(inputs, outputs, frames, midiEvents, midiEventCount); | |||
| fPlugin->run(inputs, outputs, frames, midiEvents, midiEventCount); | |||
| fData->isProcessing = false; | |||
| } | |||
| #else | |||
| @@ -429,7 +429,7 @@ public: | |||
| DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr,); | |||
| fData->isProcessing = true; | |||
| fPlugin->d_run(inputs, outputs, frames); | |||
| fPlugin->run(inputs, outputs, frames); | |||
| fData->isProcessing = false; | |||
| } | |||
| #endif | |||
| @@ -461,9 +461,9 @@ public: | |||
| if (doCallback) | |||
| { | |||
| if (fIsActive) fPlugin->d_deactivate(); | |||
| fPlugin->d_bufferSizeChanged(bufferSize); | |||
| if (fIsActive) fPlugin->d_activate(); | |||
| if (fIsActive) fPlugin->deactivate(); | |||
| fPlugin->bufferSizeChanged(bufferSize); | |||
| if (fIsActive) fPlugin->activate(); | |||
| } | |||
| } | |||
| @@ -480,9 +480,9 @@ public: | |||
| if (doCallback) | |||
| { | |||
| if (fIsActive) fPlugin->d_deactivate(); | |||
| fPlugin->d_sampleRateChanged(sampleRate); | |||
| if (fIsActive) fPlugin->d_activate(); | |||
| if (fIsActive) fPlugin->deactivate(); | |||
| fPlugin->sampleRateChanged(sampleRate); | |||
| if (fIsActive) fPlugin->activate(); | |||
| } | |||
| } | |||
| @@ -497,7 +497,7 @@ private: | |||
| // ------------------------------------------------------------------- | |||
| // Static fallback data, see DistrhoPlugin.cpp | |||
| static const d_string sFallbackString; | |||
| static const String sFallbackString; | |||
| static const AudioPort sFallbackAudioPort; | |||
| static const ParameterRanges sFallbackRanges; | |||
| @@ -24,7 +24,7 @@ | |||
| #if DISTRHO_PLUGIN_HAS_UI | |||
| # include "DistrhoUIInternal.hpp" | |||
| #else | |||
| # include "extra/d_sleep.hpp" | |||
| # include "../extra/Sleep.hpp" | |||
| #endif | |||
| #include "jack/jack.h" | |||
| @@ -129,9 +129,9 @@ public: | |||
| #if DISTRHO_PLUGIN_WANT_PROGRAMS | |||
| if (fPlugin.getProgramCount() > 0) | |||
| { | |||
| fPlugin.setProgram(0); | |||
| fPlugin.loadProgram(0); | |||
| # if DISTRHO_PLUGIN_HAS_UI | |||
| fUI.programChanged(0); | |||
| fUI.programLoaded(0); | |||
| # endif | |||
| } | |||
| #endif | |||
| @@ -461,7 +461,7 @@ int main() | |||
| if (client == nullptr) | |||
| { | |||
| d_string errorString; | |||
| String errorString; | |||
| if (status & JackFailure) | |||
| errorString += "Overall operation failed;\n"; | |||
| @@ -314,7 +314,7 @@ public: | |||
| DISTRHO_SAFE_ASSERT_RETURN(realProgram < fPlugin.getProgramCount(),); | |||
| fPlugin.setProgram(realProgram); | |||
| fPlugin.loadProgram(realProgram); | |||
| // Update control inputs | |||
| for (uint32_t i=0, count=fPlugin.getParameterCount(); i < count; ++i) | |||
| @@ -530,10 +530,9 @@ public: | |||
| #if DISTRHO_PLUGIN_NUM_INPUTS > 0 | |||
| for (ulong i=0; i < DISTRHO_PLUGIN_NUM_INPUTS; ++i, ++port) | |||
| { | |||
| char portName[24] = { '\0' }; | |||
| std::sprintf(portName, "Audio Input %lu", i+1); | |||
| const AudioPort& aport(plugin.getAudioPort(true, i)); | |||
| portNames[port] = strdup(portName); | |||
| portNames[port] = strdup(aport.name); | |||
| portDescriptors[port] = LADSPA_PORT_AUDIO | LADSPA_PORT_INPUT; | |||
| portRangeHints[port].HintDescriptor = 0x0; | |||
| @@ -545,10 +544,9 @@ public: | |||
| #if DISTRHO_PLUGIN_NUM_OUTPUTS > 0 | |||
| for (ulong i=0; i < DISTRHO_PLUGIN_NUM_OUTPUTS; ++i, ++port) | |||
| { | |||
| char portName[24] = { '\0' }; | |||
| std::sprintf(portName, "Audio Output %lu", i+1); | |||
| const AudioPort& aport(plugin.getAudioPort(false, i)); | |||
| portNames[port] = strdup(portName); | |||
| portNames[port] = strdup(aport.name); | |||
| portDescriptors[port] = LADSPA_PORT_AUDIO | LADSPA_PORT_OUTPUT; | |||
| portRangeHints[port].HintDescriptor = 0x0; | |||
| @@ -49,7 +49,7 @@ | |||
| START_NAMESPACE_DISTRHO | |||
| typedef std::map<const d_string,d_string> StringMap; | |||
| typedef std::map<const String, String> StringMap; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -119,8 +119,8 @@ public: | |||
| { | |||
| fNeededUiSends[i] = false; | |||
| const d_string& d_key(fPlugin.getStateKey(i)); | |||
| fStateMap[d_key] = fPlugin.getStateDefaultValue(i); | |||
| const String& dkey(fPlugin.getStateKey(i)); | |||
| fStateMap[dkey] = fPlugin.getStateDefaultValue(i); | |||
| } | |||
| } | |||
| else | |||
| @@ -538,16 +538,16 @@ public: | |||
| if (! fNeededUiSends[i]) | |||
| continue; | |||
| const d_string& key = fPlugin.getStateKey(i); | |||
| const String& key = fPlugin.getStateKey(i); | |||
| for (StringMap::const_iterator cit=fStateMap.begin(), cite=fStateMap.end(); cit != cite; ++cit) | |||
| { | |||
| const d_string& curKey = cit->first; | |||
| const String& curKey = cit->first; | |||
| if (curKey != key) | |||
| continue; | |||
| const d_string& value = cit->second; | |||
| const String& value = cit->second; | |||
| // set msg size (key + value + separator + 2x null terminator) | |||
| const size_t msgSize(key.length()+value.length()+3); | |||
| @@ -661,7 +661,7 @@ public: | |||
| if (realProgram >= fPlugin.getProgramCount()) | |||
| return; | |||
| fPlugin.setProgram(realProgram); | |||
| fPlugin.loadProgram(realProgram); | |||
| // Update control inputs | |||
| for (uint32_t i=0, count=fPlugin.getParameterCount(); i < count; ++i) | |||
| @@ -684,10 +684,10 @@ public: | |||
| { | |||
| for (StringMap::const_iterator cit=fStateMap.begin(), cite=fStateMap.end(); cit != cite; ++cit) | |||
| { | |||
| const d_string& key = cit->first; | |||
| const d_string& value = cit->second; | |||
| const String& key = cit->first; | |||
| const String& value = cit->second; | |||
| const d_string urnKey("urn:distrho:" + key); | |||
| const String urnKey("urn:distrho:" + key); | |||
| // some hosts need +1 for the null terminator, even though the type is string | |||
| store(handle, fUridMap->map(fUridMap->handle, urnKey.buffer()), value.buffer(), value.length()+1, fURIDs.atomString, LV2_STATE_IS_POD|LV2_STATE_IS_PORTABLE); | |||
| @@ -703,8 +703,8 @@ public: | |||
| for (uint32_t i=0, count=fPlugin.getStateCount(); i < count; ++i) | |||
| { | |||
| const d_string& key(fPlugin.getStateKey(i)); | |||
| const d_string urnKey("urn:distrho:" + key); | |||
| const String& key(fPlugin.getStateKey(i)); | |||
| const String urnKey("urn:distrho:" + key); | |||
| size = 0; | |||
| type = 0; | |||
| @@ -858,9 +858,9 @@ private: | |||
| // check if key already exists | |||
| for (StringMap::iterator it=fStateMap.begin(), ite=fStateMap.end(); it != ite; ++it) | |||
| { | |||
| const d_string& d_key(it->first); | |||
| const String& dkey(it->first); | |||
| if (d_key == key) | |||
| if (dkey == key) | |||
| { | |||
| it->second = newValue; | |||
| return; | |||
| @@ -66,8 +66,8 @@ void lv2_generate_ttl(const char* const basename) | |||
| d_lastBufferSize = 0; | |||
| d_lastSampleRate = 0.0; | |||
| d_string pluginDLL(basename); | |||
| d_string pluginTTL(pluginDLL + ".ttl"); | |||
| String pluginDLL(basename); | |||
| String pluginTTL(pluginDLL + ".ttl"); | |||
| // --------------------------------------------- | |||
| @@ -75,7 +75,7 @@ void lv2_generate_ttl(const char* const basename) | |||
| std::cout << "Writing manifest.ttl..."; std::cout.flush(); | |||
| std::fstream manifestFile("manifest.ttl", std::ios::out); | |||
| d_string manifestString; | |||
| String manifestString; | |||
| manifestString += "@prefix lv2: <" LV2_CORE_PREFIX "> .\n"; | |||
| manifestString += "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n"; | |||
| #if DISTRHO_PLUGIN_HAS_UI | |||
| @@ -101,7 +101,7 @@ void lv2_generate_ttl(const char* const basename) | |||
| manifestString += " a ui:X11UI ;\n"; | |||
| # endif | |||
| # if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS | |||
| d_string pluginUI(pluginDLL); | |||
| String pluginUI(pluginDLL); | |||
| pluginUI.truncate(pluginDLL.rfind("_dsp")); | |||
| pluginUI += "_ui"; | |||
| @@ -143,7 +143,7 @@ void lv2_generate_ttl(const char* const basename) | |||
| std::cout << "Writing " << pluginTTL << "..."; std::cout.flush(); | |||
| std::fstream pluginFile(pluginTTL, std::ios::out); | |||
| d_string pluginString; | |||
| String pluginString; | |||
| // header | |||
| #if DISTRHO_LV2_USE_EVENTS_IN | |||
| @@ -220,7 +220,7 @@ void lv2_generate_ttl(const char* const basename) | |||
| else | |||
| pluginString += " a lv2:InputPort, lv2:AudioPort ;\n"; | |||
| pluginString += " lv2:index " + d_string(portIndex) + " ;\n"; | |||
| pluginString += " lv2:index " + String(portIndex) + " ;\n"; | |||
| pluginString += " lv2:symbol \"" + port.symbol + "\" ;\n"; | |||
| pluginString += " lv2:name \"" + port.name + "\" ;\n"; | |||
| @@ -250,7 +250,7 @@ void lv2_generate_ttl(const char* const basename) | |||
| else | |||
| pluginString += " a lv2:OutputPort, lv2:AudioPort ;\n"; | |||
| pluginString += " lv2:index " + d_string(portIndex) + " ;\n"; | |||
| pluginString += " lv2:index " + String(portIndex) + " ;\n"; | |||
| pluginString += " lv2:symbol \"" + port.symbol + "\" ;\n"; | |||
| pluginString += " lv2:name \"" + port.name + "\" ;\n"; | |||
| @@ -268,10 +268,10 @@ void lv2_generate_ttl(const char* const basename) | |||
| #if DISTRHO_LV2_USE_EVENTS_IN | |||
| pluginString += " lv2:port [\n"; | |||
| pluginString += " a lv2:InputPort, atom:AtomPort ;\n"; | |||
| pluginString += " lv2:index " + d_string(portIndex) + " ;\n"; | |||
| pluginString += " lv2:index " + String(portIndex) + " ;\n"; | |||
| pluginString += " lv2:name \"Events Input\" ;\n"; | |||
| pluginString += " lv2:symbol \"lv2_events_in\" ;\n"; | |||
| pluginString += " rsz:minimumSize " + d_string(DISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE) + " ;\n"; | |||
| pluginString += " rsz:minimumSize " + String(DISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE) + " ;\n"; | |||
| pluginString += " atom:bufferType atom:Sequence ;\n"; | |||
| # if (DISTRHO_PLUGIN_WANT_STATE && DISTRHO_PLUGIN_HAS_UI) | |||
| pluginString += " atom:supports <" LV2_ATOM__String "> ;\n"; | |||
| @@ -289,10 +289,10 @@ void lv2_generate_ttl(const char* const basename) | |||
| #if DISTRHO_LV2_USE_EVENTS_OUT | |||
| pluginString += " lv2:port [\n"; | |||
| pluginString += " a lv2:OutputPort, atom:AtomPort ;\n"; | |||
| pluginString += " lv2:index " + d_string(portIndex) + " ;\n"; | |||
| pluginString += " lv2:index " + String(portIndex) + " ;\n"; | |||
| pluginString += " lv2:name \"Events Output\" ;\n"; | |||
| pluginString += " lv2:symbol \"lv2_events_out\" ;\n"; | |||
| pluginString += " rsz:minimumSize " + d_string(DISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE) + " ;\n"; | |||
| pluginString += " rsz:minimumSize " + String(DISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE) + " ;\n"; | |||
| pluginString += " atom:bufferType atom:Sequence ;\n"; | |||
| # if (DISTRHO_PLUGIN_WANT_STATE && DISTRHO_PLUGIN_HAS_UI) | |||
| pluginString += " atom:supports <" LV2_ATOM__String "> ;\n"; | |||
| @@ -307,7 +307,7 @@ void lv2_generate_ttl(const char* const basename) | |||
| #if DISTRHO_PLUGIN_WANT_LATENCY | |||
| pluginString += " lv2:port [\n"; | |||
| pluginString += " a lv2:OutputPort, lv2:ControlPort ;\n"; | |||
| pluginString += " lv2:index " + d_string(portIndex) + " ;\n"; | |||
| pluginString += " lv2:index " + String(portIndex) + " ;\n"; | |||
| pluginString += " lv2:name \"Latency\" ;\n"; | |||
| pluginString += " lv2:symbol \"lv2_latency\" ;\n"; | |||
| pluginString += " lv2:designation lv2:latency ;\n"; | |||
| @@ -328,15 +328,15 @@ void lv2_generate_ttl(const char* const basename) | |||
| else | |||
| pluginString += " a lv2:InputPort, lv2:ControlPort ;\n"; | |||
| pluginString += " lv2:index " + d_string(portIndex) + " ;\n"; | |||
| pluginString += " lv2:index " + String(portIndex) + " ;\n"; | |||
| pluginString += " lv2:name \"" + plugin.getParameterName(i) + "\" ;\n"; | |||
| // symbol | |||
| { | |||
| d_string symbol(plugin.getParameterSymbol(i)); | |||
| String symbol(plugin.getParameterSymbol(i)); | |||
| if (symbol.isEmpty()) | |||
| symbol = "lv2_port_" + d_string(portIndex-1); | |||
| symbol = "lv2_port_" + String(portIndex-1); | |||
| pluginString += " lv2:symbol \"" + symbol + "\" ;\n"; | |||
| } | |||
| @@ -347,21 +347,21 @@ void lv2_generate_ttl(const char* const basename) | |||
| if (plugin.getParameterHints(i) & kParameterIsInteger) | |||
| { | |||
| pluginString += " lv2:default " + d_string(int(plugin.getParameterValue(i))) + " ;\n"; | |||
| pluginString += " lv2:minimum " + d_string(int(ranges.min)) + " ;\n"; | |||
| pluginString += " lv2:maximum " + d_string(int(ranges.max)) + " ;\n"; | |||
| pluginString += " lv2:default " + String(int(plugin.getParameterValue(i))) + " ;\n"; | |||
| pluginString += " lv2:minimum " + String(int(ranges.min)) + " ;\n"; | |||
| pluginString += " lv2:maximum " + String(int(ranges.max)) + " ;\n"; | |||
| } | |||
| else | |||
| { | |||
| pluginString += " lv2:default " + d_string(plugin.getParameterValue(i)) + " ;\n"; | |||
| pluginString += " lv2:minimum " + d_string(ranges.min) + " ;\n"; | |||
| pluginString += " lv2:maximum " + d_string(ranges.max) + " ;\n"; | |||
| pluginString += " lv2:default " + String(plugin.getParameterValue(i)) + " ;\n"; | |||
| pluginString += " lv2:minimum " + String(ranges.min) + " ;\n"; | |||
| pluginString += " lv2:maximum " + String(ranges.max) + " ;\n"; | |||
| } | |||
| } | |||
| // unit | |||
| { | |||
| const d_string& unit(plugin.getParameterUnit(i)); | |||
| const String& unit(plugin.getParameterUnit(i)); | |||
| if (! unit.isEmpty()) | |||
| { | |||
| @@ -421,8 +421,8 @@ void lv2_generate_ttl(const char* const basename) | |||
| } | |||
| } | |||
| pluginString += " doap:name \"" + d_string(plugin.getName()) + "\" ;\n"; | |||
| pluginString += " doap:maintainer [ foaf:name \"" + d_string(plugin.getMaker()) + "\" ] .\n"; | |||
| pluginString += " doap:name \"" + String(plugin.getName()) + "\" ;\n"; | |||
| pluginString += " doap:maintainer [ foaf:name \"" + String(plugin.getMaker()) + "\" ] .\n"; | |||
| pluginFile << pluginString << std::endl; | |||
| pluginFile.close(); | |||
| @@ -64,7 +64,7 @@ struct ERect { | |||
| START_NAMESPACE_DISTRHO | |||
| typedef std::map<const d_string,d_string> StringMap; | |||
| typedef std::map<const String, String> StringMap; | |||
| // ----------------------------------------------------------------------- | |||
| @@ -315,8 +315,8 @@ public: | |||
| for (uint32_t i=0, count=fPlugin.getStateCount(); i<count; ++i) | |||
| { | |||
| const d_string& d_key(fPlugin.getStateKey(i)); | |||
| fStateMap[d_key] = fPlugin.getStateDefaultValue(i); | |||
| const String& dkey(fPlugin.getStateKey(i)); | |||
| fStateMap[dkey] = fPlugin.getStateDefaultValue(i); | |||
| } | |||
| #endif | |||
| } | |||
| @@ -436,8 +436,8 @@ public: | |||
| # if DISTRHO_PLUGIN_WANT_STATE | |||
| for (StringMap::const_iterator cit=fStateMap.begin(), cite=fStateMap.end(); cit != cite; ++cit) | |||
| { | |||
| const d_string& key = cit->first; | |||
| const d_string& value = cit->second; | |||
| const String& key = cit->first; | |||
| const String& value = cit->second; | |||
| fVstUI->setStateFromPlugin(key, value); | |||
| } | |||
| @@ -485,15 +485,15 @@ public: | |||
| } | |||
| else | |||
| { | |||
| d_string chunkStr; | |||
| String chunkStr; | |||
| for (StringMap::const_iterator cit=fStateMap.begin(), cite=fStateMap.end(); cit != cite; ++cit) | |||
| { | |||
| const d_string& key = cit->first; | |||
| const d_string& value = cit->second; | |||
| const String& key = cit->first; | |||
| const String& value = cit->second; | |||
| // join key and value | |||
| d_string tmpStr; | |||
| String tmpStr; | |||
| tmpStr = key; | |||
| tmpStr += "\xff"; | |||
| tmpStr += value; | |||
| @@ -773,9 +773,9 @@ private: | |||
| // check if key already exists | |||
| for (StringMap::iterator it=fStateMap.begin(), ite=fStateMap.end(); it != ite; ++it) | |||
| { | |||
| const d_string& d_key(it->first); | |||
| const String& dkey(it->first); | |||
| if (d_key == key) | |||
| if (dkey == key) | |||
| { | |||
| it->second = newValue; | |||
| return; | |||
| @@ -51,25 +51,25 @@ double UI::getSampleRate() const noexcept | |||
| return pData->sampleRate; | |||
| } | |||
| void UI::editParameter(const uint32_t index, const bool started) | |||
| void UI::editParameter(uint32_t index, bool started) | |||
| { | |||
| pData->editParamCallback(index + pData->parameterOffset, started); | |||
| } | |||
| void UI::setParameterValue(const uint32_t index, const float value) | |||
| void UI::setParameterValue(uint32_t index, float value) | |||
| { | |||
| pData->setParamCallback(index + pData->parameterOffset, value); | |||
| } | |||
| #if DISTRHO_PLUGIN_WANT_STATE | |||
| void UI::setState(const char* const key, const char* const value) | |||
| void UI::setState(const char* key, const char* value) | |||
| { | |||
| pData->setStateCallback(key, value); | |||
| } | |||
| #endif | |||
| #if DISTRHO_PLUGIN_IS_SYNTH | |||
| void UI::sendNote(const uint8_t channel, const uint8_t note, const uint8_t velocity) | |||
| void UI::sendNote(uint8_t channel, uint8_t note, uint8_t velocity) | |||
| { | |||
| pData->sendNoteCallback(channel, note, velocity); | |||
| } | |||
| @@ -20,7 +20,7 @@ | |||
| # error DSSI UIs do not support direct access! | |||
| #endif | |||
| #include "../extra/d_sleep.hpp" | |||
| #include "../extra/Sleep.hpp" | |||
| #include <lo/lo.h> | |||
| @@ -136,7 +136,7 @@ public: | |||
| #if DISTRHO_PLUGIN_WANT_PROGRAMS | |||
| void dssiui_program(ulong bank, ulong program) | |||
| { | |||
| fUI.programChanged(bank * 128 + program); | |||
| fUI.programLoaded(bank * 128 + program); | |||
| } | |||
| #endif | |||
| @@ -175,7 +175,7 @@ protected: | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,); | |||
| fUI->d_uiReshape(width, height); | |||
| fUI->uiReshape(width, height); | |||
| fIsReady = true; | |||
| } | |||
| @@ -184,7 +184,7 @@ protected: | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,); | |||
| fUI->d_uiFileBrowserSelected(filename); | |||
| fUI->uiFileBrowserSelected(filename); | |||
| } | |||
| private: | |||
| @@ -257,15 +257,15 @@ public: | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,); | |||
| fUI->d_parameterChanged(index, value); | |||
| fUI->parameterChanged(index, value); | |||
| } | |||
| #if DISTRHO_PLUGIN_WANT_PROGRAMS | |||
| void programChanged(const uint32_t index) | |||
| void programLoaded(const uint32_t index) | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,); | |||
| fUI->d_programChanged(index); | |||
| fUI->programLoaded(index); | |||
| } | |||
| #endif | |||
| @@ -276,7 +276,7 @@ public: | |||
| DISTRHO_SAFE_ASSERT_RETURN(key != nullptr && key[0] != '\0',); | |||
| DISTRHO_SAFE_ASSERT_RETURN(value != nullptr,); | |||
| fUI->d_stateChanged(key, value); | |||
| fUI->stateChanged(key, value); | |||
| } | |||
| #endif | |||
| @@ -295,7 +295,7 @@ public: | |||
| void exec_idle() | |||
| { | |||
| if (glWindow.isReady()) | |||
| fUI->d_uiIdle(); | |||
| fUI->uiIdle(); | |||
| } | |||
| bool idle() | |||
| @@ -305,7 +305,7 @@ public: | |||
| glApp.idle(); | |||
| if (glWindow.isReady()) | |||
| fUI->d_uiIdle(); | |||
| fUI->uiIdle(); | |||
| return ! glApp.isQuiting(); | |||
| } | |||
| @@ -364,7 +364,7 @@ public: | |||
| fData->sampleRate = sampleRate; | |||
| if (doCallback) | |||
| fUI->d_sampleRateChanged(sampleRate); | |||
| fUI->sampleRateChanged(sampleRate); | |||
| } | |||
| private: | |||
| @@ -16,7 +16,7 @@ | |||
| #include "DistrhoUIInternal.hpp" | |||
| #include "../extra/d_string.hpp" | |||
| #include "../extra/String.hpp" | |||
| #include "lv2/atom.h" | |||
| #include "lv2/atom-util.h" | |||
| @@ -195,7 +195,7 @@ public: | |||
| { | |||
| const uint32_t realProgram(bank * 128 + program); | |||
| fUI.programChanged(realProgram); | |||
| fUI.programLoaded(realProgram); | |||
| } | |||
| #endif | |||
| @@ -222,7 +222,7 @@ protected: | |||
| const uint32_t eventInPortIndex(DISTRHO_PLUGIN_NUM_INPUTS + DISTRHO_PLUGIN_NUM_OUTPUTS); | |||
| // join key and value | |||
| d_string tmpStr; | |||
| String tmpStr; | |||
| tmpStr += key; | |||
| tmpStr += "\xff"; | |||
| tmpStr += value; | |||