|
iPlug2 - C++ Audio Plug-in Framework
|
Utility functions and macros. More...
#include <algorithm>#include <cmath>#include <cstdio>#include <cstdlib>#include <cstring>#include <cctype>#include <string>#include "heapbuf.h"#include "wdlstring.h"#include "wdlutf8.h"#include "IPlugConstants.h"#include "IPlugPlatform.h"Go to the source code of this file.
Macros | |
| #define | MAKE_QUOTE(str) #str |
| #define | MAKE_STR(str) MAKE_QUOTE(str) |
| #define | GET_PARAM_FROM_VARARG(paramType, vp, v) |
Functions | |
| template<typename T > | |
| BEGIN_IPLUG_NAMESPACE T | Clip (T x, T lo, T hi) |
Clips the value x between lo and hi. More... | |
| template<typename T > | |
| T | Lerp (T a, T b, T f) |
Linear interpolate between values a and b. More... | |
| static bool | CStringHasContents (const char *str) |
| static double | DBToAmp (double dB) |
| Calculates gain from a given dB value. More... | |
| static double | AmpToDB (double amp) |
| static void | GetVersionParts (int versionInteger, int &maj, int &min, int &pat) |
| Helper function to unpack the version number parts as individual integers. More... | |
| static int | GetDecimalVersion (int versionInteger) |
| Helper function to get the version number as a decimal integer. More... | |
| static void | GetVersionStr (int versionInteger, WDL_String &str) |
| Helper function to get the semantic version number as a string from an integer. More... | |
| template<class SRC , class DEST > | |
| void | CastCopy (DEST *pDest, SRC *pSrc, int n) |
| Helper function to loop through a buffer of samples copying and casting from e.g float to double. More... | |
| static void | ToLower (char *cDest, const char *cSrc) |
| Converts a C string to lowercase. More... | |
| static EHost | LookUpHost (const char *inHost) |
| Gets the host ID from a human-readable name. More... | |
| static void | GetHostNameStr (EHost host, WDL_String &str) |
| Gets a human-readable name from host identifier. More... | |
| static void | MidiNoteName (double midiPitch, WDL_String ¬eName, bool cents=false, bool middleCisC4=false) |
| Converts a MIDI pitch number to a human-readable note name. More... | |
| static std::u16string | UTF8ToUTF16String (const char *utf8) |
| Convert UTF-8 string to UTF-16 std::u16string using WDL functions. More... | |
| static std::string | UTF16ToUTF8String (const std::u16string &u16str) |
| Convert UTF-16 std::u16string to UTF-8 std::string using WDL functions. More... | |
| static std::string | UTF16ToUTF8String (char16_t c) |
| Convert single UTF-16 char16_t to UTF-8 std::string using WDL functions. More... | |
| static std::string | UTF16ToUTF8String (const char16_t *begin, const char16_t *end) |
| Convert UTF-16 char16_t pointer range to UTF-8 std::string using WDL functions. More... | |
| int | DOMKeyToVirtualKey (uint32_t domKeyCode) |
| Converts a DOM virtual key code to an iPlug2 virtual key code. More... | |
Utility functions and macros.
Definition in file IPlugUtilities.h.