Browse Source

VST3: Update SDK to 3.7.8

v7.0.9
reuk 2 years ago
parent
commit
ab1b8de52f
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
72 changed files with 948 additions and 643 deletions
  1. +0
    -32
      modules/juce_audio_processors/format_types/VST3_SDK/JUCE_README.md
  2. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/LICENSE.txt
  3. BIN
      modules/juce_audio_processors/format_types/VST3_SDK/VST3_License_Agreement.pdf
  4. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/LICENSE.txt
  5. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/baseiids.cpp
  6. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/classfactoryhelpers.h
  7. +5
    -7
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fbuffer.cpp
  8. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fbuffer.h
  9. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fcommandline.h
  10. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fdebug.cpp
  11. +6
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fdebug.h
  12. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fobject.cpp
  13. +2
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fobject.h
  14. +13
    -9
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstreamer.cpp
  15. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstreamer.h
  16. +108
    -164
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstring.cpp
  17. +2
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstring.h
  18. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/updatehandler.cpp
  19. +2
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/base/source/updatehandler.h
  20. +2
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/base/thread/include/flock.h
  21. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/base/thread/source/flock.cpp
  22. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/LICENSE.txt
  23. +3
    -4
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/falignpush.h
  24. +36
    -59
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h
  25. +6
    -8
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fstrdefs.h
  26. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp
  27. +10
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/futils.h
  28. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstattributes.h
  29. +11
    -11
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstaudioprocessor.h
  30. +343
    -158
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstspeaker.h
  31. +3
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vsttypes.h
  32. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/LICENSE.txt
  33. +59
    -54
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/samples/vst-utilities/moduleinfotool/source/main.cpp
  34. +2
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.cpp
  35. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.h
  36. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.cpp
  37. +2
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.h
  38. +76
    -0
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/readfile.cpp
  39. +55
    -0
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/readfile.h
  40. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/hostclasses.cpp
  41. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/hostclasses.h
  42. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module.cpp
  43. +3
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module.h
  44. +15
    -7
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_linux.cpp
  45. +5
    -5
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_mac.mm
  46. +52
    -15
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_win32.cpp
  47. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/pluginterfacesupport.cpp
  48. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/pluginterfacesupport.h
  49. +3
    -3
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/jsoncxx.h
  50. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfo.h
  51. +2
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfocreator.cpp
  52. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfocreator.h
  53. +13
    -13
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp
  54. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfoparser.h
  55. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/optional.h
  56. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/stringconvert.cpp
  57. +17
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/stringconvert.h
  58. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/uid.h
  59. +3
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstbus.cpp
  60. +12
    -4
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstbus.h
  61. +2
    -2
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponent.cpp
  62. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponent.h
  63. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponentbase.cpp
  64. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponentbase.h
  65. +11
    -6
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vsteditcontroller.cpp
  66. +6
    -6
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vsteditcontroller.h
  67. +1
    -1
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstinitiids.cpp
  68. +13
    -9
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstparameters.cpp
  69. +6
    -6
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstparameters.h
  70. +3
    -3
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.cpp
  71. +3
    -3
      modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.h
  72. +1
    -0
      modules/juce_audio_processors/format_types/juce_VST3Headers.h

+ 0
- 32
modules/juce_audio_processors/format_types/VST3_SDK/JUCE_README.md View File

@@ -1,34 +1,2 @@
This list details modifications made to the VST3 SDK in order to facilitate
inclusion in JUCE.

- `#warning` directives were removed from fstring.cpp, as these cannot be
silenced with a `pragma GCC diagnostic ignored "-Wcpp"` when building with
g++.

- The version check in module_linux.cpp was changed to match the number
corresponding to the C++17 standard.

- The <limits> header was included in moduleinfoparser.cpp in order to make
std::numeric_limits visible when building with the GNU stdlib.

- Loop variable types were adjusted in moduleinfoparser.cpp to avoid forming
references to temporary values, which produced -Wrange-loop-bind-reference
warnings when building with Xcode.

- The <cstdint> header was included in moduleinfo.h in order to make uint32_t
visible when building with the GNU stdlib.

- helper.manifest was added, to be included in the moduleinfo tool in order to
force UTF-8 mode on Windows.

- std:: qualification was added to std::move call in module.cpp to silence
a -Wunqualified-std-cast-call warning.

- The main.cpp of moduleinfotool was updated to include information exported
by the plugin's IPluginCompatibility object, if present.

- Preprocessor definitions that expanded to include the keyword 'defined' were
removed in fplatform.h to silence -Wexpansion-to-defined warnings.

- Pragma warning was guarded in falignpush.h to silence -Wunknown-pragma
warnings.

+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/LICENSE.txt View File

@@ -1,6 +1,6 @@
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
This license applies only to files referencing this license,
for other files of the Software Development Kit the respective embedded license text


BIN
modules/juce_audio_processors/format_types/VST3_SDK/VST3_License_Agreement.pdf View File


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/LICENSE.txt View File

@@ -1,6 +1,6 @@
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/source/baseiids.cpp View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/source/classfactoryhelpers.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 5
- 7
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fbuffer.cpp View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -529,12 +529,10 @@ int8* Buffer::operator + (uint32 i)
{
if (i < memSize)
return buffer + i;
else
{
static int8 eof;
eof = 0;
return &eof;
}
static int8 eof;
eof = 0;
return &eof;
}

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


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fbuffer.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fcommandline.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fdebug.cpp View File

@@ -11,7 +11,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 6
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fdebug.h View File

@@ -11,7 +11,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -97,6 +97,10 @@ bool AmIBeingDebugged ();
if (!(f)) \
FDebugBreak ("%s(%d) : Assert failed: %s\n", __FILE__, __LINE__, #f);

#define SMTG_ASSERT_MSG(f, msg) \
if (!(f)) \
FDebugBreak ("%s(%d) : Assert failed: [%s] [%s]\n", __FILE__, __LINE__, #f, msg);

/** Send "comment" string to the debugger for display. */
#define SMTG_WARNING(comment) FDebugPrint ("%s(%d) : %s\n", __FILE__, __LINE__, comment);

@@ -194,6 +198,7 @@ void* operator new (size_t, int, const char*, int);
#else
/** if DEVELOPMENT is not set, these macros will do nothing. */
#define SMTG_ASSERT(f)
#define SMTG_ASSERT_MSG(f, msg)
#define SMTG_WARNING(s)
#define SMTG_PRINTSYSERROR
#define SMTG_DEBUGSTR(s)


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fobject.cpp View File

@@ -10,7 +10,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 2
- 2
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fobject.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -350,7 +350,7 @@ namespace Singleton {
virtual Steinberg::FClassID isA () const SMTG_OVERRIDE {return className::getFClassID ();} \
virtual bool isA (Steinberg::FClassID s) const SMTG_OVERRIDE {return isTypeOf (s, false);} \
virtual bool isTypeOf (Steinberg::FClassID s, bool askBaseClass = true) const SMTG_OVERRIDE \
{ return (classIDsEqual (s, #className) ? true : (askBaseClass ? baseClass::isTypeOf (s, true) : false)); }
{ return (FObject::classIDsEqual (s, #className) ? true : (askBaseClass ? baseClass::isTypeOf (s, true) : false)); }

//------------------------------------------------------------------------
/** Delegate refcount functions to BaseClass.


+ 13
- 9
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstreamer.cpp View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -587,6 +587,9 @@ TSize FStreamer::writeString8 (const char8* ptr, bool terminate)
//------------------------------------------------------------------------
TSize FStreamer::readString8 (char8* ptr, TSize size)
{
if (size < 1 || ptr == nullptr)
return 0;

TSize i = 0;
char8 c = 0;
while (i < size)
@@ -594,18 +597,19 @@ TSize FStreamer::readString8 (char8* ptr, TSize size)
if (readRaw ((void*)&c, sizeof (char)) != sizeof (char))
break;
ptr[i] = c;
i++;
if (c == '\n' || c == '\0')
break;
i++;
}
if (c == '\n' && ptr[i - 2] == '\r')
ptr[i - 2] = 0;
if (i < size)
ptr[i] = 0;
else
ptr[size - 1] = 0;
// remove at end \n (LF) or \r\n (CR+LF)
if (c == '\n')
{
if (i > 0 && ptr[i - 1] == '\r')
i--;
}
ptr[i] = 0;

return strlen (ptr);
return i;
}

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


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstreamer.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 108
- 164
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstring.cpp View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -293,7 +293,7 @@ static inline int strnicmp16 (const Steinberg::char16* s1, const Steinberg::char
//-----------------------------------------------------------------------------
static inline int sprintf16 (Steinberg::char16* wcs, const Steinberg::char16* format, ...)
{
assert(false && "DEPRECATED No Linux implementation");
assert (false && "DEPRECATED No Linux implementation");
return 0;
}

@@ -316,7 +316,7 @@ static inline int vsnwprintf (Steinberg::char16* wcs, size_t maxlen,
//-----------------------------------------------------------------------------
static inline Steinberg::char16* strrchr16 (const Steinberg::char16* str, Steinberg::char16 c)
{
assert(false && "DEPRECATED No Linux implementation");
assert (false && "DEPRECATED No Linux implementation");
return nullptr;
}

@@ -667,7 +667,7 @@ int32 ConstString::compare (const ConstString& str, int32 n, CompareMode mode) c
return 0;
return 1;
}
else if (isEmpty ())
if (isEmpty ())
return -1;

if (!isWide && !str.isWide)
@@ -676,33 +676,23 @@ int32 ConstString::compare (const ConstString& str, int32 n, CompareMode mode) c
{
if (isCaseSensitive (mode))
return strcmp (*this, str);
else
return stricmp (*this, str);
}
else
{
if (isCaseSensitive (mode))
return strncmp (*this, str, n);
else
return strnicmp (*this, str, n);
return stricmp (*this, str);
}
if (isCaseSensitive (mode))
return strncmp (*this, str, n);
return strnicmp (*this, str, n);
}
else if (isWide && str.isWide)
if (isWide && str.isWide)
{
if (n < 0)
{
if (isCaseSensitive (mode))
return strcmp16 (*this, str);
else
return stricmp16 (*this, str);
}
else
{
if (isCaseSensitive (mode))
return strncmp16 (*this, str, n);
else
return strnicmp16 (*this, str, n);
return stricmp16 (*this, str);
}
if (isCaseSensitive (mode))
return strncmp16 (*this, str, n);
return strnicmp16 (*this, str, n);
}
return compareAt (0, str, n, mode);
}
@@ -725,7 +715,7 @@ int32 ConstString::compareAt (uint32 index, const ConstString& str, int32 n, Com
return 0;
return 1;
}
else if (isEmpty ())
if (isEmpty ())
return -1;

if (!isWide && !str.isWide)
@@ -746,18 +736,13 @@ int32 ConstString::compareAt (uint32 index, const ConstString& str, int32 n, Com
{
if (isCaseSensitive (mode))
return strcmp (toCompare, str);
else
return stricmp (toCompare, str);
}
else
{
if (isCaseSensitive (mode))
return strncmp (toCompare, str, n);
else
return strnicmp (toCompare, str, n);
return stricmp (toCompare, str);
}
if (isCaseSensitive (mode))
return strncmp (toCompare, str, n);
return strnicmp (toCompare, str, n);
}
else if (isWide && str.isWide)
if (isWide && str.isWide)
{
char16* toCompare = buffer16;
if (index > 0)
@@ -775,34 +760,25 @@ int32 ConstString::compareAt (uint32 index, const ConstString& str, int32 n, Com
{
if (isCaseSensitive (mode))
return strcmp16 (toCompare, str.text16 ());
else
return stricmp16 (toCompare, str.text16 ());
}
else
{
if (isCaseSensitive (mode))
return strncmp16 (toCompare, str.text16 (), n);
else
return strnicmp16 (toCompare, str.text16 (), n);
return stricmp16 (toCompare, str.text16 ());
}
if (isCaseSensitive (mode))
return strncmp16 (toCompare, str.text16 (), n);
return strnicmp16 (toCompare, str.text16 (), n);
}
else
if (isWide)
{
if (isWide)
{
String tmp (str.text8 ());
if (tmp.toWideString () == false)
return -1;
return compareAt (index, tmp, n, mode);
}
else
{
String tmp (text8 ());
if (tmp.toWideString () == false)
return 1;
return tmp.compareAt (index, str, n, mode);
}
String tmp (str.text8 ());
if (tmp.toWideString () == false)
return -1;
return compareAt (index, tmp, n, mode);
}
String tmp (text8 ());
if (tmp.toWideString () == false)
return 1;
return tmp.compareAt (index, str, n, mode);
}

//------------------------------------------------------------------------
@@ -814,28 +790,23 @@ Steinberg::int32 ConstString::naturalCompare (const ConstString& str, CompareMod
return 0;
return 1;
}
else if (isEmpty ())
if (isEmpty ())
return -1;

if (!isWide && !str.isWide)
return strnatcmp8 (buffer8, str.text8 (), isCaseSensitive (mode));
else if (isWide && str.isWide)
if (isWide && str.isWide)
return strnatcmp16 (buffer16, str.text16 (), isCaseSensitive (mode));
else
if (isWide)
{
if (isWide)
{
String tmp (str.text8 ());
tmp.toWideString ();
return strnatcmp16 (buffer16, tmp.text16 (), isCaseSensitive (mode));
}
else
{
String tmp (text8 ());
tmp.toWideString ();
return strnatcmp16 (tmp.text16 (), str.text16 (), isCaseSensitive (mode));
}
String tmp (str.text8 ());
tmp.toWideString ();
return strnatcmp16 (buffer16, tmp.text16 (), isCaseSensitive (mode));
}
String tmp (text8 ());
tmp.toWideString ();
return strnatcmp16 (tmp.text16 (), str.text16 (), isCaseSensitive (mode));
}

//-----------------------------------------------------------------------------
@@ -845,7 +816,7 @@ bool ConstString::startsWith (const ConstString& str, CompareMode mode /*= kCase
{
return isEmpty ();
}
else if (isEmpty ())
if (isEmpty ())
{
return false;
}
@@ -859,13 +830,13 @@ bool ConstString::startsWith (const ConstString& str, CompareMode mode /*= kCase
return strncmp (buffer8, str.buffer8, str.length ()) == 0;
return strnicmp (buffer8, str.buffer8, str.length ()) == 0;
}
else if (isWide && str.isWide)
if (isWide && str.isWide)
{
if (isCaseSensitive (mode))
return strncmp16 (buffer16, str.buffer16, str.length ()) == 0;
return strnicmp16 (buffer16, str.buffer16, str.length ()) == 0;
}
else if (isWide)
if (isWide)
{
String tmp (str.text8 ());
tmp.toWideString ();
@@ -875,16 +846,13 @@ bool ConstString::startsWith (const ConstString& str, CompareMode mode /*= kCase
return strncmp16 (buffer16, tmp.buffer16, tmp.length ()) == 0;
return strnicmp16 (buffer16, tmp.buffer16, tmp.length ()) == 0;
}
else
{
String tmp (text8 ());
tmp.toWideString ();
if (str.length () > tmp.length ())
return false;
if (isCaseSensitive (mode))
return strncmp16 (tmp.buffer16, str.buffer16, str.length ()) == 0;
return strnicmp16 (tmp.buffer16, str.buffer16, str.length ()) == 0;
}
String tmp (text8 ());
tmp.toWideString ();
if (str.length () > tmp.length ())
return false;
if (isCaseSensitive (mode))
return strncmp16 (tmp.buffer16, str.buffer16, str.length ()) == 0;
return strnicmp16 (tmp.buffer16, str.buffer16, str.length ()) == 0;
}

//-----------------------------------------------------------------------------
@@ -894,7 +862,7 @@ bool ConstString::endsWith (const ConstString& str, CompareMode mode /*= kCaseSe
{
return isEmpty ();
}
else if (isEmpty ())
if (isEmpty ())
{
return false;
}
@@ -908,13 +876,13 @@ bool ConstString::endsWith (const ConstString& str, CompareMode mode /*= kCaseSe
return strncmp (buffer8 + (length () - str.length ()), str.buffer8, str.length ()) == 0;
return strnicmp (buffer8 + (length () - str.length ()), str.buffer8, str.length ()) == 0;
}
else if (isWide && str.isWide)
if (isWide && str.isWide)
{
if (isCaseSensitive (mode))
return strncmp16 (buffer16 + (length () - str.length ()), str.buffer16, str.length ()) == 0;
return strnicmp16 (buffer16 + (length () - str.length ()), str.buffer16, str.length ()) == 0;
}
else if (isWide)
if (isWide)
{
String tmp (str.text8 ());
tmp.toWideString ();
@@ -924,16 +892,13 @@ bool ConstString::endsWith (const ConstString& str, CompareMode mode /*= kCaseSe
return strncmp16 (buffer16 + (length () - tmp.length ()), tmp.buffer16, tmp.length ()) == 0;
return strnicmp16 (buffer16 + (length () - tmp.length ()), tmp.buffer16, tmp.length ()) == 0;
}
else
{
String tmp (text8 ());
tmp.toWideString ();
if (str.length () > tmp.length ())
return false;
if (isCaseSensitive (mode))
return strncmp16 (tmp.buffer16 + (tmp.length () - str.length ()), str.buffer16, str.length ()) == 0;
return strnicmp16 (tmp.buffer16 + (tmp.length () - str.length ()), str.buffer16, str.length ()) == 0;
}
String tmp (text8 ());
tmp.toWideString ();
if (str.length () > tmp.length ())
return false;
if (isCaseSensitive (mode))
return strncmp16 (tmp.buffer16 + (tmp.length () - str.length ()), str.buffer16, str.length ()) == 0;
return strnicmp16 (tmp.buffer16 + (tmp.length () - str.length ()), str.buffer16, str.length ()) == 0;
}

//-----------------------------------------------------------------------------
@@ -976,7 +941,7 @@ int32 ConstString::findNext (int32 startIndex, const ConstString& str, int32 n,
}
return -1;
}
else if (!isWide && !str.isWide)
if (!isWide && !str.isWide)
{
uint32 stringLength = str.length ();
n = n < 0 ? stringLength : Min<uint32> (n, stringLength);
@@ -1207,7 +1172,7 @@ int32 ConstString::findPrev (int32 startIndex, const ConstString& str, int32 n,
}
return -1;
}
else if (!isWide && !str.isWide)
if (!isWide && !str.isWide)
{
uint32 stringLength = str.length ();
n = n < 0 ? stringLength : Min<uint32> (n, stringLength);
@@ -1313,13 +1278,11 @@ int32 ConstString::getFirstDifferent (const ConstString& str, CompareMode mode)
return -1;
return getFirstDifferent (tmp, mode);
}
else
{
String tmp (text8 ());
if (tmp.toWideString () == false)
return -1;
return tmp.getFirstDifferent (str, mode);
}
String tmp (text8 ());
if (tmp.toWideString () == false)
return -1;
return tmp.getFirstDifferent (str, mode);
}

uint32 len1 = len;
@@ -1375,8 +1338,7 @@ bool ConstString::scanInt64 (int64& value, uint32 offset, bool scanToEnd) const

if (isWide)
return scanInt64_16 (buffer16 + offset, value, scanToEnd);
else
return scanInt64_8 (buffer8 + offset, value, scanToEnd);
return scanInt64_8 (buffer8 + offset, value, scanToEnd);
}

//-----------------------------------------------------------------------------
@@ -1387,8 +1349,7 @@ bool ConstString::scanUInt64 (uint64& value, uint32 offset, bool scanToEnd) cons

if (isWide)
return scanUInt64_16 (buffer16 + offset, value, scanToEnd);
else
return scanUInt64_8 (buffer8 + offset, value, scanToEnd);
return scanUInt64_8 (buffer8 + offset, value, scanToEnd);
}

//-----------------------------------------------------------------------------
@@ -1399,8 +1360,7 @@ bool ConstString::scanHex (uint8& value, uint32 offset, bool scanToEnd) const

if (isWide)
return scanHex_16 (buffer16 + offset, value, scanToEnd);
else
return scanHex_8 (buffer8 + offset, value, scanToEnd);
return scanHex_8 (buffer8 + offset, value, scanToEnd);
}

//-----------------------------------------------------------------------------
@@ -1411,8 +1371,7 @@ bool ConstString::scanInt32 (int32& value, uint32 offset, bool scanToEnd) const

if (isWide)
return scanInt32_16 (buffer16 + offset, value, scanToEnd);
else
return scanInt32_8 (buffer8 + offset, value, scanToEnd);
return scanInt32_8 (buffer8 + offset, value, scanToEnd);
}

//-----------------------------------------------------------------------------
@@ -1423,8 +1382,7 @@ bool ConstString::scanUInt32 (uint32& value, uint32 offset, bool scanToEnd) cons

if (isWide)
return scanUInt32_16 (buffer16 + offset, value, scanToEnd);
else
return scanUInt32_8 (buffer8 + offset, value, scanToEnd);
return scanUInt32_8 (buffer8 + offset, value, scanToEnd);
}

//-----------------------------------------------------------------------------
@@ -1434,7 +1392,7 @@ bool ConstString::scanInt64_8 (const char8* text, int64& value, bool scanToEnd)
{
if (sscanf (text, "%" FORMAT_INT64A, &value) == 1)
return true;
else if (scanToEnd == false)
if (scanToEnd == false)
return false;
text++;
}
@@ -1460,7 +1418,7 @@ bool ConstString::scanUInt64_8 (const char8* text, uint64& value, bool scanToEnd
{
if (sscanf (text, "%" FORMAT_UINT64A, &value) == 1)
return true;
else if (scanToEnd == false)
if (scanToEnd == false)
return false;
text++;
}
@@ -1510,7 +1468,7 @@ bool ConstString::scanHex_8 (const char8* text, uint8& value, bool scanToEnd)
value = (uint8)v;
return true;
}
else if (scanToEnd == false)
if (scanToEnd == false)
return false;
text++;
}
@@ -1565,7 +1523,7 @@ bool ConstString::scanFloat (double& value, uint32 offset, bool scanToEnd) const
{
if (sscanf (txt, "%lf", &value) == 1)
return true;
else if (scanToEnd == false)
if (scanToEnd == false)
return false;
txt++;
}
@@ -1593,7 +1551,7 @@ char16 ConstString::toLower (char16 c)
}
return c;
#elif SMTG_OS_LINUX
assert(false && "DEPRECATED No Linux implementation");
assert (false && "DEPRECATED No Linux implementation");
return c;
#else
return towlower (c);
@@ -1621,7 +1579,7 @@ char16 ConstString::toUpper (char16 c)
}
return c;
#elif SMTG_OS_LINUX
assert(false && "DEPRECATED No Linux implementation");
assert (false && "DEPRECATED No Linux implementation");
return c;
#else
return towupper (c);
@@ -1767,8 +1725,7 @@ bool ConstString::isDigit (uint32 index) const

if (isWide)
return ConstString::isCharDigit (buffer16[index]);
else
return ConstString::isCharDigit (buffer8[index]);
return ConstString::isCharDigit (buffer8[index]);
}

//-----------------------------------------------------------------------------
@@ -1919,7 +1876,7 @@ int32 ConstString::multiByteToWideString (char16* dest, const char8* source, int
}
else
{
assert(false && "DEPRECATED No Linux implementation");
assert (false && "DEPRECATED No Linux implementation");
}

#endif
@@ -1999,13 +1956,12 @@ int32 ConstString::wideStringToMultiByte (char8* dest, const char16* wideString,
}
else
{
assert(false && "DEPRECATED No Linux implementation");
assert (false && "DEPRECATED No Linux implementation");
}
return result;

#else
#warning DEPRECATED No Linux implementation
assert(false && "DEPRECATED No Linux implementation");
assert (false && "DEPRECATED No Linux implementation");
return 0;
#endif

@@ -2445,12 +2401,10 @@ bool String::setChar8 (uint32 index, char8 c)
len = index;
return true;
}
else
{
if (resize (index + 1, isWide, true) == false)
return false;
len = index + 1;
}
if (resize (index + 1, isWide, true) == false)
return false;
len = index + 1;
}
if (index < len && buffer)
@@ -2497,12 +2451,9 @@ bool String::setChar16 (uint32 index, char16 c)
len = index;
return true;
}
else
{
if (resize (index + 1, isWide, true) == false)
return false;
len = index + 1;
}
if (resize (index + 1, isWide, true) == false)
return false;
len = index + 1;
}

if (index < len && buffer)
@@ -2536,8 +2487,7 @@ String& String::assign (const ConstString& str, int32 n)
{
if (str.isWideString ())
return assign (str.text16 (), n < 0 ? str.length () : n);
else
return assign (str.text8 (), n < 0 ? str.length () : n);
return assign (str.text8 (), n < 0 ? str.length () : n);
}

//-----------------------------------------------------------------------------
@@ -2633,8 +2583,7 @@ String& String::append (const ConstString& str, int32 n)
{
if (str.isWideString ())
return append (str.text16 (), n);
else
return append (str.text8 (), n);
return append (str.text8 (), n);
}

//-----------------------------------------------------------------------------
@@ -2718,7 +2667,7 @@ String& String::append (const char8 c, int32 n)
{
return append (str, 1);
}
else if (n > 1)
if (n > 1)
{
if (isWide)
{
@@ -2752,7 +2701,7 @@ String& String::append (const char16 c, int32 n)
char16 str[] = {c, 0};
return append (str, 1);
}
else if (n > 1)
if (n > 1)
{
if (!isWide)
{
@@ -2781,8 +2730,7 @@ String& String::insertAt (uint32 idx, const ConstString& str, int32 n)
{
if (str.isWideString ())
return insertAt (idx, str.text16 (), n);
else
return insertAt (idx, str.text8 (), n);
return insertAt (idx, str.text8 (), n);
}

//-----------------------------------------------------------------------------
@@ -2860,8 +2808,7 @@ String& String::replace (uint32 idx, int32 n1, const ConstString& str, int32 n2)
{
if (str.isWideString ())
return replace (idx, n1, str.text16 (), n2);
else
return replace (idx, n1, str.text8 (), n2);
return replace (idx, n1, str.text8 (), n2);
}

// "replace" replaces n1 number of characters at the specified index with
@@ -3749,11 +3696,9 @@ unsigned char* String::toPascalString (unsigned char* buf)
}
return buf;
}
else
{
*buf = 0;
return buf;
}
*buf = 0;
return buf;
}

//-----------------------------------------------------------------------------
@@ -3852,7 +3797,7 @@ void* ConstString::toCFStringRef (uint32 encoding, bool mutableCFString) const
return (void*)CFStringCreateWithCString (kCFAllocator, "", encoding);
}
}
return 0;
return nullptr;
}

#endif
@@ -3886,9 +3831,9 @@ template <class T> int32 tstrnatcmp (const T* s1, const T* s2, bool caseSensitiv
{
if (s1 == nullptr && s2 == nullptr)
return 0;
else if (s1 == nullptr)
if (s1 == nullptr)
return -1;
else if (s2 == nullptr)
if (s2 == nullptr)
return 1;

while (*s1 && *s2)
@@ -3949,12 +3894,11 @@ template <class T> int32 tstrnatcmp (const T* s1, const T* s2, bool caseSensitiv

if (*s1 == 0 && *s2 == 0)
return 0;
else if (*s1 == 0)
if (*s1 == 0)
return -1;
else if (*s2 == 0)
if (*s2 == 0)
return 1;
else
return (int32)(*s1 - *s2);
return (int32)(*s1 - *s2);
}

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


+ 2
- 2
modules/juce_audio_processors/format_types/VST3_SDK/base/source/fstring.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -322,7 +322,7 @@ public:
String (const ConstString& str, int32 n = -1); ///< assign n characters of str (-1: all)
String (const FVariant& var); ///< assign from FVariant
String (IString* str); ///< assign from IString
~String ();
~String () SMTG_OVERRIDE;

#if SMTG_CPP11_STDLIBSUPPORT
String (String&& str);


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/source/updatehandler.cpp View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 2
- 2
modules/juce_audio_processors/format_types/VST3_SDK/base/source/updatehandler.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -78,7 +78,7 @@ class UpdateHandler : public FObject, public IUpdateHandler, public IUpdateManag
public:
//------------------------------------------------------------------------------
UpdateHandler ();
~UpdateHandler ();
~UpdateHandler () SMTG_OVERRIDE;

using FObject::addDependent;
using FObject::removeDependent;


+ 2
- 2
modules/juce_audio_processors/format_types/VST3_SDK/base/thread/include/flock.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -99,7 +99,7 @@ public:
FLock (const char8* name = "FLock");

/** Lock destructor. */
~FLock ();
~FLock () SMTG_OVERRIDE;

//-- ILock -----------------------------------------------------------
void lock () SMTG_OVERRIDE;


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/base/thread/source/flock.cpp View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/LICENSE.txt View File

@@ -1,6 +1,6 @@
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
This license applies only to files referencing this license,
for other files of the Software Development Kit the respective embedded license text


+ 3
- 4
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/falignpush.h View File

@@ -9,7 +9,7 @@
//-----------------------------------------------------------------------------
// This file is part of a Steinberg SDK. It is subject to the license terms
// in the LICENSE file found in the top-level directory of this distribution
// and at www.steinberg.net/sdklicenses.
// and at www.steinberg.net/sdklicenses.
// No part of the SDK, including this file, may be copied, modified, propagated,
// or distributed except according to the terms contained in the LICENSE file.
//-----------------------------------------------------------------------------
@@ -26,11 +26,10 @@
#elif defined __BORLANDC__
#pragma -a8
#elif SMTG_OS_WINDOWS
//! @brief warning C4996: alignment changed after including header, may be due to missing #pragma pack(pop)
#if defined (_MSC_VER)
//! @brief warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop)
#ifdef _MSC_VER
#pragma warning(disable : 4103)
#endif

#pragma pack(push)
#if SMTG_PLATFORM_64
#pragma pack(16)


+ 36
- 59
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h View File

@@ -71,6 +71,8 @@
#define SMTG_CPU_ARM_64EC 0
#endif

#define SMTG_OS_WINDOWS_ARM (SMTG_CPU_ARM_64EC || SMTG_CPU_ARM_64 || SMTG_CPU_ARM)

#define BYTEORDER kLittleEndian
#define COM_COMPATIBLE 1
@@ -85,12 +87,12 @@
#endif

#ifdef _MSC_VER
#pragma warning (disable : 4244) // Conversion from 'type1' to 'type2', possible loss of data.
#pragma warning (disable : 4250) // Inheritance via dominance is allowed
#pragma warning (disable : 4996) // deprecated functions
#pragma warning (disable : 4244) //! @brief warning C4244: Conversion from 'type1' to 'type2', possible loss of data.
#pragma warning (disable : 4250) //! @brief warning C4250: Inheritance via dominance is allowed
#pragma warning (disable : 4996) //! @brief warning C4996: deprecated functions

#pragma warning (3 : 4189) // local variable is initialized but not referenced
#pragma warning (3 : 4238) // nonstandard extension used : class rvalue used as lvalue
#pragma warning (3 : 4189) //! @brief warning C4189: local variable is initialized but not referenced
#pragma warning (3 : 4238) //! @brief warning C4238: nonstandard extension used : class rvalue used as lvalue
#endif

#if defined (_WIN64) || defined (_M_ARM64)
@@ -104,56 +106,35 @@
#endif

#ifdef __cplusplus
#if __cplusplus >= 201103L || _MSC_VER > 1600 || SMTG_INTEL_CXX11_MODE
#define SMTG_CPP11 1
#else
#define SMTG_CPP11 0
#endif

#define SMTG_CPP11 (__cplusplus >= 201103L || _MSC_VER > 1600 || SMTG_INTEL_CXX11_MODE)
#define SMTG_CPP11_STDLIBSUPPORT SMTG_CPP11

#if (__cplusplus >= 201402L || (defined (_MSVC_LANG) && _MSVC_LANG >= 201402L))
#define SMTG_CPP14 1
#else
#define SMTG_CPP14 0
#endif

#if (__cplusplus >= 201703L || (defined (_MSVC_LANG) && _MSVC_LANG >= 201703L))
#define SMTG_CPP17 1
#else
#define SMTG_CPP17 0
#endif

#if (_MSC_FULL_VER >= 190023026 || (SMTG_INTEL_CXX11_MODE && SMTG_INTEL_COMPILER >= 1300))
#define SMTG_HAS_NOEXCEPT 1
#else
#define SMTG_HAS_NOEXCEPT 0
#endif

#if (_MSC_FULL_VER >= 190024210L || (SMTG_INTEL_CXX11_MODE && SMTG_INTEL_COMPILER >= 1500) || (defined(__MINGW32__) && SMTG_CPP11))
#define SMTG_CPP14 (__cplusplus >= 201402L || ((_MSC_FULL_VER >= 190024210L) && (_MSVC_LANG >= 201402L)))
#define SMTG_CPP17 (__cplusplus >= 201703L || ((_MSC_FULL_VER >= 190024210L) && (_MSVC_LANG >= 201703L)))
#define SMTG_CPP20 (__cplusplus >= 202002L)
#define SMTG_HAS_NOEXCEPT ((_MSC_FULL_VER >= 190023026L) || (SMTG_INTEL_CXX11_MODE && SMTG_INTEL_COMPILER >= 1300))
#if ((_MSC_FULL_VER >= 190024210L) || (SMTG_INTEL_CXX11_MODE && SMTG_INTEL_COMPILER >= 1500) || (defined(__MINGW32__) && SMTG_CPP11))
#define SMTG_HAS_CPP11_CONSTEXPR 1
#else
#define SMTG_HAS_CPP11_CONSTEXPR 0
#endif

#if (((_MSC_VER >= 1915L) && (_MSVC_LANG >= 201402L)) || (SMTG_INTEL_CXX11_MODE && SMTG_INTEL_COMPILER > 1700) || (defined(__MINGW32__) && SMTG_CPP14))
#define SMTG_HAS_CPP14_CONSTEXPR 1
#else
#define SMTG_HAS_CPP14_CONSTEXPR 0
#endif

#endif
#endif //__cplusplus

#define SMTG_DEPRECATED_ATTRIBUTE(message) __declspec (deprecated ("Is Deprecated: " message))
//-----------------------------------------------------------------------------
// LINUX
//-----------------------------------------------------------------------------
#elif __gnu_linux__ || __linux__
#define SMTG_OS_LINUX 1
#define SMTG_OS_MACOS 0
#define SMTG_OS_WINDOWS 0
#define SMTG_OS_IOS 0
#define SMTG_OS_OSX 0
#define SMTG_OS_LINUX 1
#define SMTG_OS_MACOS 0
#define SMTG_OS_WINDOWS 0
#define SMTG_OS_WINDOWS_ARM 0
#define SMTG_OS_IOS 0
#define SMTG_OS_OSX 0

#define SMTG_CPU_X86 __i386__
#define SMTG_CPU_X86_64 __x86_64__
@@ -196,6 +177,7 @@
#endif
#define SMTG_CPP14 (__cplusplus >= 201402L)
#define SMTG_CPP17 (__cplusplus >= 201703L)
#define SMTG_CPP20 (__cplusplus >= 202002L)
#if defined(__GNUG__) && __GNUG__ < 8
#define SMTG_CPP11_STDLIBSUPPORT 0
#else
@@ -204,23 +186,24 @@
#define SMTG_HAS_NOEXCEPT 1
#define SMTG_HAS_CPP11_CONSTEXPR SMTG_CPP11
#define SMTG_HAS_CPP14_CONSTEXPR SMTG_CPP14
#endif
#endif // __cplusplus
//-----------------------------------------------------------------------------
// Mac and iOS
//-----------------------------------------------------------------------------
#elif __APPLE__
#include <TargetConditionals.h>
#define SMTG_OS_LINUX 0
#define SMTG_OS_MACOS 1
#define SMTG_OS_WINDOWS 0
#define SMTG_OS_IOS TARGET_OS_IPHONE
#define SMTG_OS_OSX TARGET_OS_MAC && !TARGET_OS_IPHONE

#define SMTG_CPU_X86 TARGET_CPU_X86
#define SMTG_CPU_X86_64 TARGET_CPU_X86_64
#define SMTG_CPU_ARM TARGET_CPU_ARM
#define SMTG_CPU_ARM_64 TARGET_CPU_ARM64
#define SMTG_CPU_ARM_64EC 0
#define SMTG_OS_LINUX 0
#define SMTG_OS_MACOS 1
#define SMTG_OS_WINDOWS 0
#define SMTG_OS_WINDOWS_ARM 0
#define SMTG_OS_IOS TARGET_OS_IPHONE
#define SMTG_OS_OSX TARGET_OS_MAC && !TARGET_OS_IPHONE

#define SMTG_CPU_X86 TARGET_CPU_X86
#define SMTG_CPU_X86_64 TARGET_CPU_X86_64
#define SMTG_CPU_ARM TARGET_CPU_ARM
#define SMTG_CPU_ARM_64 TARGET_CPU_ARM64
#define SMTG_CPU_ARM_64EC 0

#if !SMTG_OS_IOS
#ifndef __CF_USE_FRAMEWORK_INCLUDES__
@@ -274,6 +257,7 @@
#define SMTG_CPP11 (__cplusplus >= 201103L || SMTG_INTEL_CXX11_MODE)
#define SMTG_CPP14 (__cplusplus >= 201402L)
#define SMTG_CPP17 (__cplusplus >= 201703L)
#define SMTG_CPP20 (__cplusplus >= 202002L)
#if defined (_LIBCPP_VERSION) && SMTG_CPP11
#define SMTG_CPP11_STDLIBSUPPORT 1
#define SMTG_HAS_NOEXCEPT 1
@@ -283,7 +267,7 @@
#endif
#define SMTG_HAS_CPP11_CONSTEXPR SMTG_CPP11
#define SMTG_HAS_CPP14_CONSTEXPR SMTG_CPP14
#endif
#endif // __cplusplus
//-----------------------------------------------------------------------------
// Unknown Platform
//-----------------------------------------------------------------------------
@@ -291,13 +275,6 @@
#pragma error unknown platform
#endif

//-----------------------------------------------------------------------------
#if SMTG_OS_WINDOWS && (SMTG_CPU_ARM_64EC || SMTG_CPU_ARM_64 || SMTG_CPU_ARM)
#define SMTG_OS_WINDOWS_ARM 1
#else
#define SMTG_OS_WINDOWS_ARM 0
#endif

//-----------------------------------------------------------------------------
#if !SMTG_RENAME_ASSERT
#undef WINDOWS


+ 6
- 8
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fstrdefs.h View File

@@ -133,12 +133,11 @@ inline SMTG_CONSTEXPR14 int32 _tstrcmp (const T* src, const T* dst)

if (*src == 0 && *dst == 0)
return 0;
else if (*src == 0)
if (*src == 0)
return -1;
else if (*dst == 0)
if (*dst == 0)
return 1;
else
return (int32) (*src - *dst);
return (int32) (*src - *dst);
}

inline SMTG_CONSTEXPR14 int32 tstrcmp (const tchar* src, const tchar* dst) {return _tstrcmp (src, dst);}
@@ -169,12 +168,11 @@ inline SMTG_CONSTEXPR14 int32 _tstrncmp (const T* first, const T* last, uint32 c

if (*first == 0 && *last == 0)
return 0;
else if (*first == 0)
if (*first == 0)
return -1;
else if (*last == 0)
if (*last == 0)
return 1;
else
return (int32) (*first - *last);
return (int32) (*first - *last);
}

inline SMTG_CONSTEXPR14 int32 tstrncmp (const tchar* first, const tchar* last, uint32 count) {return _tstrncmp (first, last, count);}


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp View File

@@ -406,7 +406,7 @@ void FUID::toRegistryString (char8* string) const
char8 s5[13];
Steinberg::toString8 (s5, data, 10, 16);

snprintf (string, 36, "{%s-%s-%s-%s-%s}", s1, s2, s3, s4, s5);
snprintf (string, 40, "{%s-%s-%s-%s-%s}", s1, s2, s3, s4, s5);
#endif
}



+ 10
- 1
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/futils.h View File

@@ -27,34 +27,39 @@ inline const T& Min (const T& a, const T& b)
return b < a ? b : a;
}

//----------------------------------------------------------------------------
template <class T>
inline const T& Max (const T& a, const T& b)
{
return a < b ? b : a;
}

//----------------------------------------------------------------------------
template <class T>
inline T Abs (const T& value)
{
return (value >= (T)0) ? value : -value;
}

//----------------------------------------------------------------------------
template <class T>
inline T Sign (const T& value)
{
return (value == (T)0) ? 0 : ((value >= (T)0) ? 1 : -1);
}

//----------------------------------------------------------------------------
template <class T>
inline T Bound (T minval, T maxval, T x)
{
if (x < minval)
return minval;
else if (x > maxval)
if (x > maxval)
return maxval;
return x;
}

//----------------------------------------------------------------------------
template <class T>
void Swap (T& t1, T& t2)
{
@@ -63,6 +68,7 @@ void Swap (T& t1, T& t2)
t2 = tmp;
}

//----------------------------------------------------------------------------
template <class T>
bool IsApproximateEqual (T t1, T t2, T epsilon)
{
@@ -76,18 +82,21 @@ bool IsApproximateEqual (T t1, T t2, T epsilon)
return false;
}

//----------------------------------------------------------------------------
template <class T>
inline T ToNormalized (const T& value, const int32 numSteps)
{
return value / T (numSteps);
}

//----------------------------------------------------------------------------
template <class T>
inline int32 FromNormalized (const T& norm, const int32 numSteps)
{
return Min<int32> (numSteps, int32 (norm * (numSteps + 1)));
}

//----------------------------------------------------------------------------
// Four character constant
#ifndef CCONST
#define CCONST(a, b, c, d) \


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstattributes.h View File

@@ -106,7 +106,7 @@ tresult PLUGIN_API MyPlugin::setState (IBStream* state)
UString128 tmp (string);
char ascii[128];
tmp.toAscii (ascii, 128);
if (!strncmp (ascii, StateType::kProject, strlen (StateType::kProject)))
if (strncmp (ascii, StateType::kProject, strlen (StateType::kProject)) == 0)
{
// we are in project loading context...
}


+ 11
- 11
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/ivstaudioprocessor.h View File

@@ -46,25 +46,26 @@ namespace PlugType
\defgroup plugType Plug-in Type used for subCategories */
/*@{*/
//------------------------------------------------------------------------
SMTG_CONSTEXPR const CString kFx = "Fx"; ///< others type (not categorized)
SMTG_CONSTEXPR const CString kFxAnalyzer = "Fx|Analyzer"; ///< Scope, FFT-Display, Loudness Processing...
SMTG_CONSTEXPR const CString kFxDelay = "Fx|Delay"; ///< Delay, Multi-tap Delay, Ping-Pong Delay...
SMTG_CONSTEXPR const CString kFxDistortion = "Fx|Distortion"; ///< Amp Simulator, Sub-Harmonic, SoftClipper...
SMTG_CONSTEXPR const CString kFxDynamics = "Fx|Dynamics"; ///< Compressor, Expander, Gate, Limiter, Maximizer, Tape Simulator, EnvelopeShaper...
SMTG_CONSTEXPR const CString kFxEQ = "Fx|EQ"; ///< Equalization, Graphical EQ...
SMTG_CONSTEXPR const CString kFxFilter = "Fx|Filter"; ///< WahWah, ToneBooster, Specific Filter,...
SMTG_CONSTEXPR const CString kFx = "Fx"; ///< others type (not categorized)
SMTG_CONSTEXPR const CString kFxGenerator = "Fx|Generator"; ///< Tone Generator, Noise Generator...
SMTG_CONSTEXPR const CString kFxInstrument = "Fx|Instrument"; ///< Fx which could be loaded as Instrument too
SMTG_CONSTEXPR const CString kFxInstrumentExternal = "Fx|Instrument|External"; ///< Fx which could be loaded as Instrument too and is external (wrapped Hardware)
SMTG_CONSTEXPR const CString kFxSpatial = "Fx|Spatial"; ///< MonoToStereo, StereoEnhancer,...
SMTG_CONSTEXPR const CString kFxGenerator = "Fx|Generator"; ///< Tone Generator, Noise Generator...
SMTG_CONSTEXPR const CString kFxMastering = "Fx|Mastering"; ///< Dither, Noise Shaping,...
SMTG_CONSTEXPR const CString kFxModulation = "Fx|Modulation"; ///< Phaser, Flanger, Chorus, Tremolo, Vibrato, AutoPan, Rotary, Cloner...
SMTG_CONSTEXPR const CString kFxNetwork = "Fx|Network"; ///< using Network
SMTG_CONSTEXPR const CString kFxPitchShift = "Fx|Pitch Shift"; ///< Pitch Processing, Pitch Correction, Vocal Tuning...
SMTG_CONSTEXPR const CString kFxRestoration = "Fx|Restoration"; ///< Denoiser, Declicker,...
SMTG_CONSTEXPR const CString kFxReverb = "Fx|Reverb"; ///< Reverberation, Room Simulation, Convolution Reverb...
SMTG_CONSTEXPR const CString kFxSpatial = "Fx|Spatial"; ///< MonoToStereo, StereoEnhancer,...
SMTG_CONSTEXPR const CString kFxSurround = "Fx|Surround"; ///< dedicated to surround processing: LFE Splitter, Bass Manager...
SMTG_CONSTEXPR const CString kFxTools = "Fx|Tools"; ///< Volume, Mixer, Tuner...
SMTG_CONSTEXPR const CString kFxNetwork = "Fx|Network"; ///< using Network
SMTG_CONSTEXPR const CString kFxVocals = "Fx|Vocals"; ///< Tools dedicated to vocals

SMTG_CONSTEXPR const CString kInstrument = "Instrument"; ///< Effect used as instrument (sound generator), not as insert
SMTG_CONSTEXPR const CString kInstrumentDrum = "Instrument|Drum"; ///< Instrument for Drum sounds
@@ -74,16 +75,15 @@ SMTG_CONSTEXPR const CString kInstrumentSampler = "Instrument|Sampler"; ///< In
SMTG_CONSTEXPR const CString kInstrumentSynth = "Instrument|Synth"; ///< Instrument based on Synthesis
SMTG_CONSTEXPR const CString kInstrumentSynthSampler = "Instrument|Synth|Sampler"; ///< Instrument based on Synthesis and Samples

SMTG_CONSTEXPR const CString kAmbisonics = "Ambisonics"; ///< used for Ambisonics channel (FX or Panner/Mixconverter/Up-Mixer/Down-Mixer when combined with other category)
SMTG_CONSTEXPR const CString kAnalyzer = "Analyzer"; ///< Meter, Scope, FFT-Display, not selectable as insert plug-in
SMTG_CONSTEXPR const CString kNoOfflineProcess = "NoOfflineProcess"; ///< will be NOT used for plug-in offline processing (will work as normal insert plug-in)
SMTG_CONSTEXPR const CString kOnlyARA = "OnlyARA"; ///< used for plug-ins that require ARA to operate (will not work as normal insert plug-in)
SMTG_CONSTEXPR const CString kOnlyOfflineProcess = "OnlyOfflineProcess"; ///< used for plug-in offline processing (will not work as normal insert plug-in)
SMTG_CONSTEXPR const CString kOnlyRealTime = "OnlyRT"; ///< indicates that it supports only realtime process call, no processing faster than realtime
SMTG_CONSTEXPR const CString kSpatial = "Spatial"; ///< used for SurroundPanner
SMTG_CONSTEXPR const CString kSpatialFx = "Spatial|Fx"; ///< used for SurroundPanner and as insert effect
SMTG_CONSTEXPR const CString kOnlyRealTime = "OnlyRT"; ///< indicates that it supports only realtime process call, no processing faster than realtime
SMTG_CONSTEXPR const CString kOnlyOfflineProcess = "OnlyOfflineProcess"; ///< used for plug-in offline processing (will not work as normal insert plug-in)
SMTG_CONSTEXPR const CString kOnlyARA = "OnlyARA"; ///< used for plug-ins that require ARA to operate (will not work as normal insert plug-in)

SMTG_CONSTEXPR const CString kNoOfflineProcess = "NoOfflineProcess"; ///< will be NOT used for plug-in offline processing (will work as normal insert plug-in)
SMTG_CONSTEXPR const CString kUpDownMix = "Up-Downmix"; ///< used for Mixconverter/Up-Mixer/Down-Mixer
SMTG_CONSTEXPR const CString kAnalyzer = "Analyzer"; ///< Meter, Scope, FFT-Display, not selectable as insert plug-in
SMTG_CONSTEXPR const CString kAmbisonics = "Ambisonics"; ///< used for Ambisonics channel (FX or Panner/Mixconverter/Up-Mixer/Down-Mixer when combined with other category)

SMTG_CONSTEXPR const CString kMono = "Mono"; ///< used for Mono only plug-in [optional]
SMTG_CONSTEXPR const CString kStereo = "Stereo"; ///< used for Stereo only plug-in [optional]


+ 343
- 158
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vstspeaker.h View File

@@ -76,6 +76,15 @@ const Speaker kSpeakerACN12 = (Speaker)1 << 46; ///< Ambisonic ACN 12
const Speaker kSpeakerACN13 = (Speaker)1 << 47; ///< Ambisonic ACN 13
const Speaker kSpeakerACN14 = (Speaker)1 << 48; ///< Ambisonic ACN 14
const Speaker kSpeakerACN15 = (Speaker)1 << 49; ///< Ambisonic ACN 15
const Speaker kSpeakerACN16 = (Speaker)1 << 50; ///< Ambisonic ACN 16
const Speaker kSpeakerACN17 = (Speaker)1 << 51; ///< Ambisonic ACN 17
const Speaker kSpeakerACN18 = (Speaker)1 << 52; ///< Ambisonic ACN 18
const Speaker kSpeakerACN19 = (Speaker)1 << 53; ///< Ambisonic ACN 19
const Speaker kSpeakerACN20 = (Speaker)1 << 54; ///< Ambisonic ACN 20
const Speaker kSpeakerACN21 = (Speaker)1 << 55; ///< Ambisonic ACN 21
const Speaker kSpeakerACN22 = (Speaker)1 << 56; ///< Ambisonic ACN 22
const Speaker kSpeakerACN23 = (Speaker)1 << 57; ///< Ambisonic ACN 23
const Speaker kSpeakerACN24 = (Speaker)1 << 58; ///< Ambisonic ACN 24

const Speaker kSpeakerTsl = (Speaker)1 << 24; ///< Top Side Left (Tsl)
const Speaker kSpeakerTsr = (Speaker)1 << 25; ///< Top Side Right (Tsr)
@@ -103,6 +112,7 @@ namespace SpeakerArr
{
//------------------------------------------------------------------------
/** Speaker Arrangement Definitions.
* for example: 5.0.5.3 for 5x Middle + 0x LFE + 5x Top + 3x Bottom
\ingroup speakerArrangements */
/*@{*/
const SpeakerArrangement kEmpty = 0; ///< empty arrangement
@@ -116,45 +126,46 @@ const SpeakerArrangement kStereoTF = kSpeakerTfl | kSpeakerTfr; ///< Tfl Tfr
const SpeakerArrangement kStereoTS = kSpeakerTsl | kSpeakerTsr; ///< Tsl Tsr
const SpeakerArrangement kStereoTR = kSpeakerTrl | kSpeakerTrr; ///< Trl Trr
const SpeakerArrangement kStereoBF = kSpeakerBfl | kSpeakerBfr; ///< Bfl Bfr
const SpeakerArrangement kCineFront = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLc | kSpeakerRc; ///< L R C Lc Rc
/** L R C Lc Rc */
const SpeakerArrangement kCineFront = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLc | kSpeakerRc;

/** L R C */
/** L R C */ // 3.0
const SpeakerArrangement k30Cine = kSpeakerL | kSpeakerR | kSpeakerC;
/** L R C Lfe */
const SpeakerArrangement k31Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe;
/** L R C Lfe */ // 3.1
const SpeakerArrangement k31Cine = k30Cine | kSpeakerLfe;
/** L R S */
const SpeakerArrangement k30Music = kSpeakerL | kSpeakerR | kSpeakerCs;
/** L R Lfe S */
const SpeakerArrangement k31Music = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerCs;
/** L R C S (LCRS) */
const SpeakerArrangement k31Music = k30Music | kSpeakerLfe;
/** L R C S */ // LCRS
const SpeakerArrangement k40Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerCs;
/** L R C Lfe S (LCRS+Lfe) */
const SpeakerArrangement k41Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerCs;
/** L R Ls Rs (Quadro) */
/** L R C Lfe S */ // LCRS+Lfe
const SpeakerArrangement k41Cine = k40Cine | kSpeakerLfe;
/** L R Ls Rs */ // 4.0 (Quadro)
const SpeakerArrangement k40Music = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs;
/** L R Lfe Ls Rs (Quadro+Lfe) */
const SpeakerArrangement k41Music = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerLs | kSpeakerRs;
/** L R Lfe Ls Rs */ // 4.1 (Quadro+Lfe)
const SpeakerArrangement k41Music = k40Music | kSpeakerLfe;
/** L R C Ls Rs */ // 5.0 (ITU 0+5+0.0 Sound System B)
const SpeakerArrangement k50 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs;
/** L R C Lfe Ls Rs */ // 5.1 (ITU 0+5+0.1 Sound System B)
const SpeakerArrangement k51 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs;
const SpeakerArrangement k51 = k50 | kSpeakerLfe;
/** L R C Ls Rs Cs */
const SpeakerArrangement k60Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerCs;
/** L R C Lfe Ls Rs Cs */
const SpeakerArrangement k61Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs;
const SpeakerArrangement k61Cine = k60Cine | kSpeakerLfe;
/** L R Ls Rs Sl Sr */
const SpeakerArrangement k60Music = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
/** L R Lfe Ls Rs Sl Sr */
const SpeakerArrangement k61Music = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
const SpeakerArrangement k61Music = k60Music | kSpeakerLfe;
/** L R C Ls Rs Lc Rc */
const SpeakerArrangement k70Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc;
/** L R C Lfe Ls Rs Lc Rc */
const SpeakerArrangement k71Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc;
const SpeakerArrangement k71Cine = k70Cine | kSpeakerLfe;
const SpeakerArrangement k71CineFullFront = k71Cine;
/** L R C Ls Rs Sl Sr */ // (ITU 0+7+0.0 Sound System I)
const SpeakerArrangement k70Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
/** L R C Lfe Ls Rs Sl Sr */ // (ITU 0+7+0.1 Sound System I)
const SpeakerArrangement k71Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
const SpeakerArrangement k71Music = k70Music | kSpeakerLfe;

/** L R C Lfe Ls Rs Lcs Rcs */
const SpeakerArrangement k71CineFullRear = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLcs | kSpeakerRcs;
@@ -165,31 +176,37 @@ const SpeakerArrangement k71Proximity = kSpeakerL | kSpeakerR | kSpeakerC |
/** L R C Ls Rs Lc Rc Cs */
const SpeakerArrangement k80Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs;
/** L R C Lfe Ls Rs Lc Rc Cs */
const SpeakerArrangement k81Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs;
const SpeakerArrangement k81Cine = k80Cine | kSpeakerLfe;
/** L R C Ls Rs Cs Sl Sr */
const SpeakerArrangement k80Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerSl | kSpeakerSr;
/** L R C Lfe Ls Rs Cs Sl Sr */
const SpeakerArrangement k81Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerSl | kSpeakerSr;
const SpeakerArrangement k81Music = k80Music | kSpeakerLfe;
/** L R C Ls Rs Lc Rc Sl Sr */
const SpeakerArrangement k90Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc |
kSpeakerSl | kSpeakerSr;
/** L R C Lfe Ls Rs Lc Rc Sl Sr */
const SpeakerArrangement k91Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc |
kSpeakerSl | kSpeakerSr;
const SpeakerArrangement k91Cine = k90Cine | kSpeakerLfe;
/** L R C Ls Rs Lc Rc Cs Sl Sr */
const SpeakerArrangement k100Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs |
kSpeakerSl | kSpeakerSr;
/** L R C Lfe Ls Rs Lc Rc Cs Sl Sr */
const SpeakerArrangement k101Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs |
kSpeakerSl | kSpeakerSr;
const SpeakerArrangement k101Cine = k100Cine | kSpeakerLfe;

/** First-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization */
/** First-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization (4 channels) */
const SpeakerArrangement kAmbi1stOrderACN = kSpeakerACN0 | kSpeakerACN1 | kSpeakerACN2 | kSpeakerACN3;
/** Second-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization */
/** Second-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization (9 channels) */
const SpeakerArrangement kAmbi2cdOrderACN = kAmbi1stOrderACN | kSpeakerACN4 | kSpeakerACN5 | kSpeakerACN6 | kSpeakerACN7 | kSpeakerACN8;
/** Third-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization */
/** Third-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization (16 channels) */
const SpeakerArrangement kAmbi3rdOrderACN = kAmbi2cdOrderACN | kSpeakerACN9 | kSpeakerACN10 | kSpeakerACN11 | kSpeakerACN12 | kSpeakerACN13 | kSpeakerACN14 | kSpeakerACN15;

/** Fourth-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization (25 channels) */
const SpeakerArrangement kAmbi4thOrderACN = kAmbi3rdOrderACN | kSpeakerACN16 | kSpeakerACN17 | kSpeakerACN18 | kSpeakerACN19 | kSpeakerACN20 |
kSpeakerACN21 | kSpeakerACN22 | kSpeakerACN23 | kSpeakerACN24;
/** Fifth-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization (36 channels) */
const SpeakerArrangement kAmbi5thOrderACN = 0x000FFFFFFFFF;
/** Sixth-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization (49 channels) */
const SpeakerArrangement kAmbi6thOrderACN = 0x0001FFFFFFFFFFFF;
/** Seventh-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization (64 channels) */
const SpeakerArrangement kAmbi7thOrderACN = 0xFFFFFFFFFFFFFFFF;

/*-----------*/
/* 3D formats */
@@ -210,12 +227,17 @@ const SpeakerArrangement k70MPEG3D = k70CineFrontHigh;
const SpeakerArrangement k50_2 = k70CineFrontHigh;

/** L R C Lfe Ls Rs Tfl Tfr */ // 5.1.2 (ITU 2+5+0.1 Sound System C)
const SpeakerArrangement k71CineFrontHigh = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerTfl | kSpeakerTfr;
const SpeakerArrangement k71CineFrontHigh = k70CineFrontHigh | kSpeakerLfe;
const SpeakerArrangement k71MPEG3D = k71CineFrontHigh;
const SpeakerArrangement k51_2 = k71CineFrontHigh;

/** L R C Ls Rs Tsl Tsr */ // 5.0.2 (Side)
const SpeakerArrangement k70CineSideHigh = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerTsl | kSpeakerTsr;
const SpeakerArrangement k50_2_TS = k70CineSideHigh;

/** L R C Lfe Ls Rs Tsl Tsr */ // 5.1.2 (Side)
const SpeakerArrangement k71CineSideHigh = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerTsl | kSpeakerTsr;
const SpeakerArrangement k71CineSideHigh = k70CineSideHigh | kSpeakerLfe;
const SpeakerArrangement k51_2_TS = k71CineSideHigh;

/** L R Lfe Ls Rs Tfl Tfc Tfr Bfc */ // 4.1.3.1
const SpeakerArrangement k81MPEG3D = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
@@ -228,25 +250,21 @@ const SpeakerArrangement k90 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerL
const SpeakerArrangement k50_4 = k90;

/** L R C Lfe Ls Rs Tfl Tfr Trl Trr */ // 5.1.4 (ITU 4+5+0.1 Sound System D)
const SpeakerArrangement k91 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
kSpeakerTfl| kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
const SpeakerArrangement k91 = k90 | kSpeakerLfe;
const SpeakerArrangement k51_4 = k91;

/** L R C Ls Rs Tfl Tfr Trl Trr Bfc */ // 5.0.4.1 (ITU 4+5+1.0 Sound System E)
const SpeakerArrangement k50_4_1 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerBfc;
const SpeakerArrangement k50_4_1 = k50_4 | kSpeakerBfc;

/** L R C Lfe Ls Rs Tfl Tfr Trl Trr Bfc */ // 5.1.4.1 (ITU 4+5+1.1 Sound System E)
const SpeakerArrangement k51_4_1 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerBfc;
/** L R C Lfe Ls Rs Tfl Tfr Trl Trr Bfc */ // 5.1.4.1 (ITU 4+5+1.1 Sound System E)
const SpeakerArrangement k51_4_1 = k50_4_1 | kSpeakerLfe;

/** L R C Ls Rs Sl Sr Tsl Tsr */ // 7.0.2
const SpeakerArrangement k70_2 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerSl | kSpeakerSr | kSpeakerTsl | kSpeakerTsr;

/** L R C Lfe Ls Rs Sl Sr Tsl Tsr */ // 7.1.2
const SpeakerArrangement k71_2 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
kSpeakerSl | kSpeakerSr | kSpeakerTsl | kSpeakerTsr;
const SpeakerArrangement k71_2 = k70_2 | kSpeakerLfe;
const SpeakerArrangement k91Atmos = k71_2; // 9.1 Dolby Atmos (3D)

/** L R C Ls Rs Sl Sr Tfl Tfr Trc */ // 7.0.3 (ITU 3+7+0.0 Sound System F)
@@ -254,16 +272,14 @@ const SpeakerArrangement k70_3 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeake
kSpeakerSl | kSpeakerSr | kSpeakerTfl | kSpeakerTfr | kSpeakerTrc;

/** L R C Lfe Ls Rs Sl Sr Tfl Tfr Trc Lfe2 */ // 7.2.3 (ITU 3+7+0.2 Sound System F)
const SpeakerArrangement k72_3 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
kSpeakerSl | kSpeakerSr | kSpeakerTfl | kSpeakerTfr | kSpeakerTrc | kSpeakerLfe2;
const SpeakerArrangement k72_3 = k70_3 | kSpeakerLfe | kSpeakerLfe2;

/** L R C Ls Rs Sl Sr Tfl Tfr Trl Trr */ // 7.0.4 (ITU 4+7+0.0 Sound System J)
const SpeakerArrangement k70_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;

/** L R C Lfe Ls Rs Sl Sr Tfl Tfr Trl Trr */ // 7.1.4 (ITU 4+7+0.1 Sound System J)
const SpeakerArrangement k71_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
const SpeakerArrangement k71_4 = k70_4 | kSpeakerLfe;
const SpeakerArrangement k111MPEG3D = k71_4;

/** L R C Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr */ // 7.0.6
@@ -272,9 +288,7 @@ const SpeakerArrangement k70_6 = kSpeakerL | kSpeakerR | kSpeakerC |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr;

/** L R C Lfe Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr */ // 7.1.6
const SpeakerArrangement k71_6 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe |
kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr;
const SpeakerArrangement k71_6 = k70_6 | kSpeakerLfe;

/** L R C Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr */ // 9.0.4 (ITU 4+9+0.0 Sound System G)
const SpeakerArrangement k90_4 = kSpeakerL | kSpeakerR | kSpeakerC |
@@ -282,9 +296,7 @@ const SpeakerArrangement k90_4 = kSpeakerL | kSpeakerR | kSpeakerC |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;

/** L R C Lfe Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr */ // 9.1.4 (ITU 4+9+0.1 Sound System G)
const SpeakerArrangement k91_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe |
kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerSl | kSpeakerSr |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
const SpeakerArrangement k91_4 = k90_4 | kSpeakerLfe;

/** L R C Lfe Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr Tsl Tsr */ // 9.0.6
const SpeakerArrangement k90_6 = kSpeakerL | kSpeakerR | kSpeakerC |
@@ -292,18 +304,15 @@ const SpeakerArrangement k90_6 = kSpeakerL | kSpeakerR | kSpeakerC |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr;

/** L R C Lfe Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr Tsl Tsr */ // 9.1.6
const SpeakerArrangement k91_6 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe |
kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerSl | kSpeakerSr |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr;
const SpeakerArrangement k91_6 = k90_6 | kSpeakerLfe;

/** L R C Ls Rs Tc Tfl Tfr Trl Trr */ // 5.0.5
/** L R C Ls Rs Tc Tfl Tfr Trl Trr */ // 5.0.5 (10.0 Auro-3D)
const SpeakerArrangement k100 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerTc | kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
const SpeakerArrangement k50_5 = k100;

/** L R C Lfe Ls Rs Tc Tfl Tfr Trl Trr */ // 5.1.5
const SpeakerArrangement k101 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
kSpeakerTc | kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
/** L R C Lfe Ls Rs Tc Tfl Tfr Trl Trr */ // 5.1.5 (10.1 Auro-3D)
const SpeakerArrangement k101 = k50_5 | kSpeakerLfe;
const SpeakerArrangement k101MPEG3D = k101;
const SpeakerArrangement k51_5 = k101;

@@ -312,14 +321,13 @@ const SpeakerArrangement k102 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeake
kSpeakerTfl| kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerLfe2;
const SpeakerArrangement k52_5 = k102;

/** L R C Ls Rs Tc Tfl Tfc Tfr Trl Trr */ // 5.0.6
/** L R C Ls Rs Tc Tfl Tfc Tfr Trl Trr */ // 5.0.6 (11.0 Auro-3D)
const SpeakerArrangement k110 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
const SpeakerArrangement k50_6 = k110;

/** L R C Lfe Ls Rs Tc Tfl Tfc Tfr Trl Trr */ // 5.1.6
const SpeakerArrangement k111 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
/** L R C Lfe Ls Rs Tc Tfl Tfc Tfr Trl Trr */ // 5.1.6 (11.1 Auro-3D)
const SpeakerArrangement k111 = k110 | kSpeakerLfe;
const SpeakerArrangement k51_6 = k111;

/** L R C Lfe Ls Rs Lc Rc Tfl Tfc Tfr Trl Trr Lfe2 */ // 7.2.5
@@ -327,13 +335,12 @@ const SpeakerArrangement k122 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeake
kSpeakerTfl| kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerLfe2;
const SpeakerArrangement k72_5 = k122;

/** L R C Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr */ // 7.0.6
/** L R C Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr */ // 7.0.6 (13.0 Auro-3D)
const SpeakerArrangement k130 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;

/** L R C Lfe Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr */ // 7.1.6
const SpeakerArrangement k131 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
/** L R C Lfe Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr */ // 7.1.6 (13.1 Auro-3D)
const SpeakerArrangement k131 = k130 | kSpeakerLfe;

/** L R Ls Rs Sl Sr Tfl Tfr Trl Trr Bfl Bfr Brl Brr */ // 6.0.4.4
const SpeakerArrangement k140 = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
@@ -354,13 +361,61 @@ const SpeakerArrangement k222 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeake
const SpeakerArrangement k102_9_3 = k222;

/** L R C Ls Rs Tfl Tfc Tfr Trl Trr Bfl Bfc Bfr */ // 5.0.5.3
const SpeakerArrangement k50_5_3 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
const SpeakerArrangement k50_5_3 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
kSpeakerBfl | kSpeakerBfc | kSpeakerBfr;

/** L R C Lfe Ls Rs Tfl Tfc Tfr Trl Trr Bfl Bfc Bfr */ // 5.1.5.3
const SpeakerArrangement k51_5_3 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
kSpeakerBfl | kSpeakerBfc | kSpeakerBfr;

const SpeakerArrangement k51_5_3 = k50_5_3 | kSpeakerLfe;

/** L R C Ls Rs Tsl Tsr Bfl Bfr */ // 5.0.2.2
const SpeakerArrangement k50_2_2 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerTsl | kSpeakerTsr |
kSpeakerBfl | kSpeakerBfr;

/** L R C Ls Rs Tfl Tfr Trl Trr Bfl Bfr */ // 5.0.4.2
const SpeakerArrangement k50_4_2 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
kSpeakerBfl | kSpeakerBfr;

/** L R C Ls Rs Sl Sr Tfl Tfr Trl Trr Bfl Bfr */ // 7.0.4.2
const SpeakerArrangement k70_4_2 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
kSpeakerBfl | kSpeakerBfr;

/** L R C Ls Rs Tfl Tfc Tfr Trl Trr */ // 5.0.5.0 (Sony 360RA)
const SpeakerArrangement k50_5_Sony = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;

/** C Sl Sr Cs Tsl Tsr Bsl Bsr */ // 4.0.2.2 (Sony 360RA)
const SpeakerArrangement k40_2_2 = kSpeakerC | kSpeakerSl | kSpeakerSr | kSpeakerCs |
kSpeakerTsl | kSpeakerTsr |
kSpeakerBsl | kSpeakerBsr;

/** L R Ls Rs Tfl Tfr Trl Trr Bfl Bfr */ // 4.0.4.2 (Sony 360RA)
const SpeakerArrangement k40_4_2 = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
kSpeakerBfl | kSpeakerBfr;

/** L R C Ls Rs Tfl Tfc Tfr Bfl Bfr */ // 5.0.3.2 (Sony 360RA)
const SpeakerArrangement k50_3_2 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerTfl | kSpeakerTfc | kSpeakerTfr |
kSpeakerBfl | kSpeakerBfr;

/** L R C Tfl Tfc Tfr Trl Trr Bfl Bfr */ // 3.0.5.2 (Sony 360RA)
const SpeakerArrangement k30_5_2 = kSpeakerL | kSpeakerR | kSpeakerC |
kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
kSpeakerBfl | kSpeakerBfr;

/** L R Ls Rs Tfl Tfr Trl Trr Bfl Bfr Brl Brr */ // 4.0.4.4 (Sony 360RA)
const SpeakerArrangement k40_4_4 = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
kSpeakerBfl | kSpeakerBfr | kSpeakerBrl | kSpeakerBrr;

/** L R C Ls Rs Tfl Tfr Trl Trr Bfl Bfr Brl Brr */ // 5.0.4.4 (Sony 360RA)
const SpeakerArrangement k50_4_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
kSpeakerBfl | kSpeakerBfr | kSpeakerBrl | kSpeakerBrr;

//------------------------------------------------------------------------
/** Speaker Arrangement String Representation.
@@ -403,22 +458,23 @@ const CString kString71Music = "7.1";
const CString kString71MusicOld = "7.1 Music (Dolby)";
const CString kString71CineTopCenter = "7.1 Cine Top Center";
const CString kString71CineCenterHigh = "7.1 Cine Center High";
const CString kString71CineFrontHigh = "7.1 Cine Front High";
const CString kString70CineFrontHigh = "7.0 Cine Front High";
const CString kString71CineSideHigh = "7.1 Cine Side High";
const CString kString71CineFullRear = "7.1 Cine Full Rear";
const CString kString71Proximity = "7.1 Proximity";
const CString kString71CineFullRear = "7.1 Cine Full Rear";
const CString kString51_2 = "5.1.2";
const CString kString50_2 = "5.0.2";
const CString kString50_2TopSide = "5.0.2 Top Side";
const CString kString51_2TopSide = "5.1.2 Top Side";
const CString kString71Proximity = "7.1 Proximity";
const CString kString80Cine = "8.0 Cine";
const CString kString80Music = "8.0 Music";
const CString kString80Cube = "8.0 Cube";
const CString kString40_4 = "8.0 Cube";
const CString kString81Cine = "8.1 Cine";
const CString kString81Music = "8.1 Music";
const CString kString90Cine = "9.0 Cine";
const CString kString91Cine = "9.1 Cine";
const CString kString100Cine = "10.0 Cine";
const CString kString101Cine = "10.1 Cine";
const CString kString102 = "10.2 Experimental";
const CString kString122 = "12.2";
const CString kString52_5 = "5.2.5";
const CString kString72_5 = "12.2";
const CString kString50_4 = "5.0.4";
const CString kString51_4 = "5.1.4";
const CString kString50_4_1 = "5.0.4.1";
@@ -435,22 +491,36 @@ const CString kString90_4 = "9.0.4";
const CString kString91_4 = "9.1.4";
const CString kString90_6 = "9.0.6";
const CString kString91_6 = "9.1.6";
const CString kString100 = "10.0 Auro-3D";
const CString kString101 = "10.1 Auro-3D";
const CString kString110 = "11.0 Auro-3D";
const CString kString111 = "11.1 Auro-3D";
const CString kString50_5 = "10.0 Auro-3D";
const CString kString51_5 = "10.1 Auro-3D";
const CString kString50_6 = "11.0 Auro-3D";
const CString kString51_6 = "11.1 Auro-3D";
const CString kString130 = "13.0 Auro-3D";
const CString kString131 = "13.1 Auro-3D";
const CString kString81MPEG = "8.1 MPEG";
const CString kString140 = "14.0";
const CString kString41_4_1 = "8.1 MPEG";
const CString kString60_4_4 = "14.0";
const CString kString220 = "22.0";
const CString kString222 = "22.2";
const CString kString220 = "22.0";
const CString kString50_5_3 = "5.0.5.3";
const CString kString51_5_3 = "5.1.5.3";
const CString kString50_2_2 = "5.0.2.2";
const CString kString50_4_2 = "5.0.4.2";
const CString kString70_4_2 = "7.0.4.2";
const CString kString50_5_Sony = "5.0.5 Sony";
const CString kString40_2_2 = "4.0.3.2";
const CString kString40_4_2 = "4.0.4.2";
const CString kString50_3_2 = "5.0.3.2";
const CString kString30_5_2 = "3.0.5.2";
const CString kString40_4_4 = "4.0.4.4";
const CString kString50_4_4 = "5.0.4.4";

const CString kStringAmbi1stOrder = "1st Order Ambisonics";
const CString kStringAmbi2cdOrder = "2nd Order Ambisonics";
const CString kStringAmbi3rdOrder = "3rd Order Ambisonics";

const CString kStringAmbi4thOrder = "4th Order Ambisonics";
const CString kStringAmbi5thOrder = "5th Order Ambisonics";
const CString kStringAmbi6thOrder = "6th Order Ambisonics";
const CString kStringAmbi7thOrder = "7th Order Ambisonics";
/*@}*/

//------------------------------------------------------------------------
@@ -490,14 +560,15 @@ const CString kString80CineS = "L R C Ls Rs Lc Rc Cs";
const CString kString80MusicS = "L R C Ls Rs Cs Sl Sr";
const CString kString81CineS = "L R C LFE Ls Rs Lc Rc Cs";
const CString kString81MusicS = "L R C LFE Ls Rs Cs Sl Sr";
const CString kString80CubeS = "L R Ls Rs Tfl Tfr Trl Trr";
const CString kString40_4S = "L R Ls Rs Tfl Tfr Trl Trr";
const CString kString71CineTopCenterS = "L R C LFE Ls Rs Cs Tc";
const CString kString71CineCenterHighS = "L R C LFE Ls Rs Cs Tfc";
const CString kString71CineFrontHighS = "L R C LFE Ls Rs Tfl Tfr";
const CString kString70CineFrontHighS = "L R C Ls Rs Tfl Tfr";
const CString kString71CineSideHighS = "L R C LFE Ls Rs Tsl Tsr";
const CString kString71CineFullRearS = "L R C LFE Ls Rs Lcs Rcs";
const CString kString71ProximityS = "L R C LFE Ls Rs Pl Pr";
const CString kString71CineFullRearS = "L R C LFE Ls Rs Lcs Rcs";
const CString kString50_2S = "L R C Ls Rs Tfl Tfr";
const CString kString51_2S = "L R C LFE Ls Rs Tfl Tfr";
const CString kString50_2TopSideS = "L R C Ls Rs Tsl Tsr";
const CString kString51_2TopSideS = "L R C LFE Ls Rs Tsl Tsr";
const CString kString71ProximityS = "L R C LFE Ls Rs Pl Pr";
const CString kString90CineS = "L R C Ls Rs Lc Rc Sl Sr";
const CString kString91CineS = "L R C LFE Ls Rs Lc Rc Sl Sr";
const CString kString100CineS = "L R C Ls Rs Lc Rc Cs Sl Sr";
@@ -518,24 +589,38 @@ const CString kString90_4S = "L R C Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr";
const CString kString91_4S = "L R C LFE Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr";
const CString kString90_6S = "L R C Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr Tsl Tsr";
const CString kString91_6S = "L R C LFE Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr Tsl Tsr";
const CString kString100S = "L R C Ls Rs Tc Tfl Tfr Trl Trr";
const CString kString101S = "L R C LFE Ls Rs Tc Tfl Tfr Trl Trr";
const CString kString110S = "L R C Ls Rs Tc Tfl Tfc Tfr Trl Trr";
const CString kString111S = "L R C LFE Ls Rs Tc Tfl Tfc Tfr Trl Trr";
const CString kString50_5S = "L R C Ls Rs Tc Tfl Tfr Trl Trr";
const CString kString51_5S = "L R C LFE Ls Rs Tc Tfl Tfr Trl Trr";
const CString kString50_5_SonyS = "L R C Ls Rs Tfl Tfc Tfr Trl Trr";
const CString kString50_6S = "L R C Ls Rs Tc Tfl Tfc Tfr Trl Trr";
const CString kString51_6S = "L R C LFE Ls Rs Tc Tfl Tfc Tfr Trl Trr";
const CString kString130S = "L R C Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr";
const CString kString131S = "L R C LFE Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr";
const CString kString102S = "L R C LFE Ls Rs Tfl Tfc Tfr Trl Trr LFE2";
const CString kString122S = "L R C LFE Ls Rs Lc Rc Tfl Tfc Tfr Trl Trr LFE2";
const CString kString81MPEGS = "L R LFE Ls Rs Tfl Tfc Tfr Bfc";
const CString kString140S = "L R Ls Rs Sl Sr Tfl Tfr Trl Trr Bfl Bfr Brl Brr";
const CString kString222S = "L R C LFE Ls Rs Lc Rc Cs Sl Sr Tc Tfl Tfc Tfr Trl Trc Trr LFE2 Tsl Tsr Bfl Bfc Bfr";
const CString kString220S = "L R C Ls Rs Lc Rc Cs Sl Sr Tc Tfl Tfc Tfr Trl Trc Trr Tsl Tsr Bfl Bfc Bfr";
const CString kString52_5S = "L R C LFE Ls Rs Tfl Tfc Tfr Trl Trr LFE2";
const CString kString72_5S = "L R C LFE Ls Rs Lc Rc Tfl Tfc Tfr Trl Trr LFE2";
const CString kString41_4_1S = "L R LFE Ls Rs Tfl Tfc Tfr Bfc";
const CString kString30_5_2S = "L R C Tfl Tfc Tfr Trl Trr Bfl Bfr";
const CString kString40_2_2S = "C Sl Sr Cs Tfc Tsl Tsr Trc";
const CString kString40_4_2S = "L R Ls Rs Tfl Tfr Trl Trr Bfl Bfr";
const CString kString40_4_4S = "L R Ls Rs Tfl Tfr Trl Trr Bfl Bfr Brl Brr";
const CString kString50_4_4S = "L R C Ls Rs Tfl Tfr Trl Trr Bfl Bfr Brl Brr";
const CString kString60_4_4S = "L R Ls Rs Sl Sr Tfl Tfr Trl Trr Bfl Bfr Brl Brr";
const CString kString50_5_3S = "L R C Ls Rs Tfl Tfc Tfr Trl Trr Bfl Bfc Bfr";
const CString kString51_5_3S = "L R C LFE Ls Rs Tfl Tfc Tfr Trl Trr Bfl Bfc Bfr";

const CString kStringAmbi1stOrderS = "0 1 2 3";
const CString kStringAmbi2cdOrderS = "0 1 2 3 4 5 6 7 8";
const CString kStringAmbi3rdOrderS = "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15";
const CString kString50_2_2S = "L R C Ls Rs Tsl Tsr Bfl Bfr";
const CString kString50_3_2S = "L R C Ls Rs Tfl Tfc Tfr Bfl Bfr";
const CString kString50_4_2S = "L R C Ls Rs Tfl Tfr Trl Trr Bfl Bfr";
const CString kString70_4_2S = "L R C Ls Rs Sl Sr Tfl Tfr Trl Trr Bfl Bfr";
const CString kString222S = "L R C LFE Ls Rs Lc Rc Cs Sl Sr Tc Tfl Tfc Tfr Trl Trc Trr LFE2 Tsl Tsr Bfl Bfc Bfr";
const CString kString220S = "L R C Ls Rs Lc Rc Cs Sl Sr Tc Tfl Tfc Tfr Trl Trc Trr Tsl Tsr Bfl Bfc Bfr";

const CString kStringAmbi1stOrderS = "0 1 2 3";
const CString kStringAmbi2cdOrderS = "0 1 2 3 4 5 6 7 8";
const CString kStringAmbi3rdOrderS = "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15";
const CString kStringAmbi4thOrderS = "0..24";
const CString kStringAmbi5thOrderS = "0..35";
const CString kStringAmbi6thOrderS = "0..48";
const CString kStringAmbi7thOrderS = "0..63";
/*@}*/

//------------------------------------------------------------------------
@@ -631,8 +716,9 @@ inline bool hasTopSpeakers (const SpeakerArrangement& arr)
/** Returns true if arrangement contains bottom (lower layer) speakers */
inline bool hasBottomSpeakers (const SpeakerArrangement& arr)
{
if (arr & kSpeakerBfl || arr & kSpeakerBfc || arr & kSpeakerBfl || arr & kSpeakerBfc ||
arr & kSpeakerBfr)
if (arr & kSpeakerBfl || arr & kSpeakerBfc || arr & kSpeakerBfr ||
arr & kSpeakerBsl || arr & kSpeakerBsr ||
arr & kSpeakerBrr || arr & kSpeakerBrl || arr & kSpeakerBrc)
return true;
return false;
}
@@ -672,16 +758,39 @@ inline bool is3D (const SpeakerArrangement& arr)
}

//------------------------------------------------------------------------
/** Returns true if arrangement is a Auro configuration. */
/** Returns true if arrangement is a Ambisonic configuration. */
inline bool isAmbisonics (const SpeakerArrangement& arr)
{
if (arr == kAmbi1stOrderACN || arr == kAmbi2cdOrderACN || arr == kAmbi3rdOrderACN)
if (arr == kAmbi1stOrderACN || arr == kAmbi2cdOrderACN || arr == kAmbi3rdOrderACN ||
arr == kAmbi4thOrderACN || arr == kAmbi5thOrderACN || arr == kAmbi6thOrderACN ||
arr == kAmbi7thOrderACN)
{
return true;
}
return false;
}


//------------------------------------------------------------------------
/** Converts a speaker of a Ambisonic order 1 to 4 to a Ambisonic order 7 (5 to 7) (return 0 when out of range).*/
inline Speaker convertSpeaker_Ambi_1234Order_to_Ambi567Order (Speaker speaker_1234_order)
{
int32 idx = getSpeakerIndex (speaker_1234_order, kAmbi4thOrderACN);
if (idx < 0)
return 0;
return (Speaker)1 << idx;
}

//------------------------------------------------------------------------
/** Converts a speaker of a Ambisonic order 5 to 7 to a Ambisonic order 4 (1 to 4) (return 0 when out of range).*/
inline Speaker convertSpeaker_Ambi_567Order_to_Ambi1234Order (Speaker speaker_567_order)
{
int32 idx = getSpeakerIndex (speaker_567_order, kAmbi7thOrderACN);
if (idx < 0)
return 0;
return getSpeaker (kAmbi4thOrderACN, idx);
}

//------------------------------------------------------------------------
/** Returns the speaker arrangement associated to a string representation.
Returns kEmpty if no associated arrangement is known. */
@@ -755,22 +864,24 @@ inline SpeakerArrangement getSpeakerArrangementFromString (CString arrStr)
return k81Cine;
if (!strcmp8 (arrStr, kString81Music))
return k81Music;
if (!strcmp8 (arrStr, kString102))
return k102;
if (!strcmp8 (arrStr, kString122))
return k122;
if (!strcmp8 (arrStr, kString80Cube))
return k80Cube;
if (!strcmp8 (arrStr, kString52_5))
return k52_5;
if (!strcmp8 (arrStr, kString72_5))
return k72_5;
if (!strcmp8 (arrStr, kString40_4))
return k40_4;
if (!strcmp8 (arrStr, kString71CineTopCenter))
return k71CineTopCenter;
if (!strcmp8 (arrStr, kString71CineCenterHigh))
return k71CineCenterHigh;
if (!strcmp8 (arrStr, kString71CineFrontHigh))
return k71CineFrontHigh;
if (!strcmp8 (arrStr, kString70CineFrontHigh))
return k70CineFrontHigh;
if (!strcmp8 (arrStr, kString71CineSideHigh))
return k71CineSideHigh;
if (!strcmp8 (arrStr, kString50_2))
return k50_2;
if (!strcmp8 (arrStr, kString51_2))
return k51_2;
if (!strcmp8 (arrStr, kString50_2TopSide))
return k50_2_TS;
if (!strcmp8 (arrStr, kString51_2TopSide))
return k51_2_TS;
if (!strcmp8 (arrStr, kString71CineFullRear))
return k71CineFullRear;
if (!strcmp8 (arrStr, kString90Cine))
@@ -789,8 +900,8 @@ inline SpeakerArrangement getSpeakerArrangementFromString (CString arrStr)
return k50_4_1;
if (!strcmp8 (arrStr, kString51_4_1))
return k51_4_1;
if (!strcmp8 (arrStr, kString81MPEG))
return k81MPEG3D;
if (!strcmp8 (arrStr, kString41_4_1))
return k41_4_1;
if (!strcmp8 (arrStr, kString70_2))
return k70_2;
if (!strcmp8 (arrStr, kString71_2))
@@ -815,20 +926,20 @@ inline SpeakerArrangement getSpeakerArrangementFromString (CString arrStr)
return k90_6;
if (!strcmp8 (arrStr, kString91_6))
return k91_6;
if (!strcmp8 (arrStr, kString100))
return k100;
if (!strcmp8 (arrStr, kString101))
return k101;
if (!strcmp8 (arrStr, kString110))
return k110;
if (!strcmp8 (arrStr, kString111))
return k111;
if (!strcmp8 (arrStr, kString50_5))
return k50_5;
if (!strcmp8 (arrStr, kString51_5))
return k51_5;
if (!strcmp8 (arrStr, kString50_6))
return k50_6;
if (!strcmp8 (arrStr, kString51_6))
return k51_6;
if (!strcmp8 (arrStr, kString130))
return k130;
if (!strcmp8 (arrStr, kString131))
return k131;
if (!strcmp8 (arrStr, kString140))
return k140;
if (!strcmp8 (arrStr, kString60_4_4))
return k60_4_4;
if (!strcmp8 (arrStr, kString222))
return k222;
if (!strcmp8 (arrStr, kString220))
@@ -837,12 +948,42 @@ inline SpeakerArrangement getSpeakerArrangementFromString (CString arrStr)
return k50_5_3;
if (!strcmp8 (arrStr, kString51_5_3))
return k51_5_3;
if (!strcmp8 (arrStr, kString50_2_2))
return k50_2_2;
if (!strcmp8 (arrStr, kString50_4_2))
return k50_4_2;
if (!strcmp8 (arrStr, kString70_4_2))
return k70_4_2;

if (!strcmp8 (arrStr, kString50_5_Sony))
return k50_5_Sony;
if (!strcmp8 (arrStr, kString40_2_2))
return k40_2_2;
if (!strcmp8 (arrStr, kString40_4_2))
return k40_4_2;
if (!strcmp8 (arrStr, kString50_3_2))
return k50_3_2;
if (!strcmp8 (arrStr, kString30_5_2))
return k30_5_2;
if (!strcmp8 (arrStr, kString40_4_4))
return k40_4_4;
if (!strcmp8 (arrStr, kString50_4_4))
return k50_4_4;

if (!strcmp8 (arrStr, kStringAmbi1stOrder))
return kAmbi1stOrderACN;
if (!strcmp8 (arrStr, kStringAmbi2cdOrder))
return kAmbi2cdOrderACN;
if (!strcmp8 (arrStr, kStringAmbi3rdOrder))
return kAmbi3rdOrderACN;
if (!strcmp8 (arrStr, kStringAmbi4thOrder))
return kAmbi4thOrderACN;
if (!strcmp8 (arrStr, kStringAmbi5thOrder))
return kAmbi5thOrderACN;
if (!strcmp8 (arrStr, kStringAmbi6thOrder))
return kAmbi6thOrderACN;
if (!strcmp8 (arrStr, kStringAmbi7thOrder))
return kAmbi7thOrderACN;
return kEmpty;
}

@@ -854,6 +995,7 @@ inline CString getSpeakerArrangementString (SpeakerArrangement arr, bool withSpe
switch (arr)
{
case kMono: return withSpeakersName ? kStringMonoS : kStringMono;
//--- Stereo pairs---
case kStereo: return withSpeakersName ? kStringStereoS : kStringStereo;
case kStereoSurround: return withSpeakersName ? kStringStereoRS : kStringStereoR;
case kStereoCenter: return withSpeakersName ? kStringStereoCS : kStringStereoC;
@@ -863,59 +1005,61 @@ inline CString getSpeakerArrangementString (SpeakerArrangement arr, bool withSpe
case kStereoTS: return withSpeakersName ? kStringStereoTSS : kStringStereoTS;
case kStereoTR: return withSpeakersName ? kStringStereoTRS : kStringStereoTR;
case kStereoBF: return withSpeakersName ? kStringStereoBFS : kStringStereoBF;
//--- ---
case kCineFront: return withSpeakersName ? kStringCineFrontS : kStringCineFront;
case k30Cine: return withSpeakersName ? kString30CineS : kString30Cine;
case k30Music: return withSpeakersName ? kString30MusicS : kString30Music;
case k31Cine: return withSpeakersName ? kString31CineS : kString31Cine;
case k30Music: return withSpeakersName ? kString30MusicS : kString30Music;
case k31Music: return withSpeakersName ? kString31MusicS : kString31Music;
case k40Cine: return withSpeakersName ? kString40CineS : kString40Cine;
case k40Music: return withSpeakersName ? kString40MusicS : kString40Music;
case k41Cine: return withSpeakersName ? kString41CineS : kString41Cine;
case k40Music: return withSpeakersName ? kString40MusicS : kString40Music;
case k41Music: return withSpeakersName ? kString41MusicS : kString41Music;
case k50: return withSpeakersName ? kString50S : kString50;
case k51: return withSpeakersName ? kString51S : kString51;
case k60Cine: return withSpeakersName ? kString60CineS : kString60Cine;
case k60Music: return withSpeakersName ? kString60MusicS : kString60Music;
case k61Cine: return withSpeakersName ? kString61CineS : kString61Cine;
case k60Music: return withSpeakersName ? kString60MusicS : kString60Music;
case k61Music: return withSpeakersName ? kString61MusicS : kString61Music;
case k70Cine: return withSpeakersName ? kString70CineS : kString70Cine;
case k70Music: return withSpeakersName ? kString70MusicS : kString70Music;
case k71Cine: return withSpeakersName ? kString71CineS : kString71Cine;
case k70Music: return withSpeakersName ? kString70MusicS : kString70Music;
case k71Music: return withSpeakersName ? kString71MusicS : kString71Music;
case k71Proximity: return withSpeakersName ? kString71ProximityS : kString71Proximity;
case k80Cine: return withSpeakersName ? kString80CineS : kString80Cine;
case k80Music: return withSpeakersName ? kString80MusicS : kString80Music;
case k81Cine: return withSpeakersName ? kString81CineS : kString81Cine;
case k80Music: return withSpeakersName ? kString80MusicS : kString80Music;
case k81Music: return withSpeakersName ? kString81MusicS : kString81Music;
case k81MPEG3D: return withSpeakersName ? kString81MPEGS : kString81MPEG;
case k102: return withSpeakersName ? kString102S : kString102;
case k122: return withSpeakersName ? kString122S : kString122;
case k80Cube: return withSpeakersName ? kString80CubeS : kString80Cube;
case k71CineTopCenter: return withSpeakersName ? kString71CineTopCenterS : kString71CineTopCenter;
case k71CineCenterHigh: return withSpeakersName ? kString71CineCenterHighS : kString71CineCenterHigh;
case k71CineFrontHigh: return withSpeakersName ? kString71CineFrontHighS : kString71CineFrontHigh;
case k70CineFrontHigh: return withSpeakersName ? kString70CineFrontHighS : kString70CineFrontHigh;
case k71CineSideHigh: return withSpeakersName ? kString71CineSideHighS : kString71CineSideHigh;
case k71CineFullRear: return withSpeakersName ? kString71CineFullRearS : kString71CineFullRear;
case k90Cine: return withSpeakersName ? kString90CineS : kString90Cine;
case k71CineFullRear: return withSpeakersName ? kString71CineFullRearS : kString71CineFullRear;
case k90Cine: return withSpeakersName ? kString90CineS : kString90Cine;
case k91Cine: return withSpeakersName ? kString91CineS : kString91Cine;
case k100Cine: return withSpeakersName ? kString100CineS : kString100Cine;
case k101Cine: return withSpeakersName ? kString101CineS : kString101Cine;
case k100: return withSpeakersName ? kString100S : kString100;
case k101: return withSpeakersName ? kString101S : kString101;
case k110: return withSpeakersName ? kString110S : kString110;
case k111: return withSpeakersName ? kString111S : kString111;

//---With Tops ---
case k71CineTopCenter: return withSpeakersName ? kString71CineTopCenterS : kString71CineTopCenter;
case k71CineCenterHigh: return withSpeakersName ? kString71CineCenterHighS : kString71CineCenterHigh;
case k50_2_TS: return withSpeakersName ? kString50_2TopSideS : kString50_2TopSide;
case k51_2_TS: return withSpeakersName ? kString51_2TopSideS : kString51_2TopSide;
case k40_4: return withSpeakersName ? kString40_4S : kString40_4;
case k50_2: return withSpeakersName ? kString50_2S : kString50_2;
case k51_2: return withSpeakersName ? kString51_2S : kString51_2;
case k50_4: return withSpeakersName ? kString50_4S : kString50_4;
case k51_4: return withSpeakersName ? kString51_4S : kString51_4;
case k50_4_1: return withSpeakersName ? kString50_4_1S : kString50_4_1;
case k51_4_1: return withSpeakersName ? kString51_4_1S : kString51_4_1;
case k50_5: return withSpeakersName ? kString50_5S : kString50_5;
case k51_5: return withSpeakersName ? kString51_5S : kString51_5;
case k52_5: return withSpeakersName ? kString52_5S : kString52_5;
case k50_6: return withSpeakersName ? kString50_6S : kString50_6;
case k51_6: return withSpeakersName ? kString51_6S : kString51_6;
case k70_2: return withSpeakersName ? kString70_2S : kString70_2;
case k71_2: return withSpeakersName ? kString71_2S : kString71_2;
case k70_3: return withSpeakersName ? kString70_3S : kString70_3;
case k72_3: return withSpeakersName ? kString72_3S : kString72_3;
case k70_4: return withSpeakersName ? kString70_4S : kString70_4;
case k71_4: return withSpeakersName ? kString71_4S : kString71_4;
case k72_5: return withSpeakersName ? kString72_5S : kString72_5;
case k70_6: return withSpeakersName ? kString70_6S : kString70_6;
case k71_6: return withSpeakersName ? kString71_6S : kString71_6;
case k90_4: return withSpeakersName ? kString90_4S : kString90_4;
@@ -924,21 +1068,44 @@ inline CString getSpeakerArrangementString (SpeakerArrangement arr, bool withSpe
case k91_6: return withSpeakersName ? kString91_6S : kString91_6;
case k130: return withSpeakersName ? kString130S : kString130;
case k131: return withSpeakersName ? kString131S : kString131;
case k140: return withSpeakersName ? kString140S : kString140;
case k222: return withSpeakersName ? kString222S : kString222;
case k220: return withSpeakersName ? kString220S : kString220;
//--- With Tops and Bottoms ---
case k41_4_1: return withSpeakersName ? kString41_4_1S : kString41_4_1;
case k50_4_1: return withSpeakersName ? kString50_4_1S : kString50_4_1;
case k51_4_1: return withSpeakersName ? kString51_4_1S : kString51_4_1;
case k50_5_3: return withSpeakersName ? kString50_5_3S : kString50_5_3;
case k51_5_3: return withSpeakersName ? kString51_5_3S : kString51_5_3;
break;
}
case k50_2_2: return withSpeakersName ? kString50_2_2S : kString50_2_2;
case k50_4_2: return withSpeakersName ? kString50_4_2S : kString50_4_2;
case k60_4_4: return withSpeakersName ? kString60_4_4S : kString60_4_4;
case k70_4_2: return withSpeakersName ? kString70_4_2S : kString70_4_2;

case k50_5_Sony: return withSpeakersName ? kString50_5_SonyS : kString50_5_Sony;
case k40_2_2: return withSpeakersName ? kString40_2_2S : kString40_2_2;
case k40_4_2: return withSpeakersName ? kString40_4_2S : kString40_4_2;
case k50_3_2: return withSpeakersName ? kString50_3_2S : kString50_3_2;
case k30_5_2: return withSpeakersName ? kString30_5_2S : kString30_5_2;
case k40_4_4: return withSpeakersName ? kString40_4_4S : kString40_4_4;
case k50_4_4: return withSpeakersName ? kString50_4_4S : kString50_4_4;

case k220: return withSpeakersName ? kString220S : kString220;
case k222: return withSpeakersName ? kString222S : kString222;
}
//--- Ambisonics ---
if (arr == kAmbi1stOrderACN)
return withSpeakersName ? kStringAmbi1stOrderS : kStringAmbi1stOrder;
if (arr == kAmbi2cdOrderACN)
return withSpeakersName ? kStringAmbi2cdOrderS : kStringAmbi2cdOrder;
if (arr == kAmbi3rdOrderACN)
return withSpeakersName ? kStringAmbi3rdOrderS : kStringAmbi3rdOrder;

if (arr == kAmbi4thOrderACN)
return withSpeakersName ? kStringAmbi4thOrderS : kStringAmbi4thOrder;
if (arr == kAmbi5thOrderACN)
return withSpeakersName ? kStringAmbi5thOrderS : kStringAmbi5thOrder;
if (arr == kAmbi6thOrderACN)
return withSpeakersName ? kStringAmbi6thOrderS : kStringAmbi6thOrder;
if (arr == kAmbi7thOrderACN)
return withSpeakersName ? kStringAmbi7thOrderS : kStringAmbi7thOrder;
return kStringEmpty;
}

@@ -1041,6 +1208,24 @@ inline CString getSpeakerShortName (const SpeakerArrangement& arr, int32 index)
return "14";
if (speaker == kSpeakerACN15)
return "15";
if (speaker == kSpeakerACN16)
return "16";
if (speaker == kSpeakerACN17)
return "17";
if (speaker == kSpeakerACN18)
return "18";
if (speaker == kSpeakerACN19)
return "19";
if (speaker == kSpeakerACN20)
return "20";
if (speaker == kSpeakerACN21)
return "21";
if (speaker == kSpeakerACN22)
return "22";
if (speaker == kSpeakerACN23)
return "23";
if (speaker == kSpeakerACN24)
return "24";

if (speaker == kSpeakerTsl)
return "Tsl";


+ 3
- 2
modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/vst/vsttypes.h View File

@@ -24,17 +24,18 @@ namespace Vst {
//------------------------------------------------------------------------
/** VST 3 SDK Version */
#ifndef kVstVersionString
#define kVstVersionString "VST 3.7.7" ///< SDK version for PClassInfo2
#define kVstVersionString "VST 3.7.8" ///< SDK version for PClassInfo2
#endif

#define kVstVersionMajor 3
#define kVstVersionMinor 7
#define kVstVersionSub 7
#define kVstVersionSub 8

#define VST_VERSION ((kVstVersionMajor << 16) | (kVstVersionMinor << 8) | kVstVersionSub)

// Versions History which allows to write such code:
// #if VST_VERSION >= VST_3_6_5_VERSION
#define VST_3_7_8_VERSION 0x030708
#define VST_3_7_7_VERSION 0x030707
#define VST_3_7_6_VERSION 0x030706
#define VST_3_7_5_VERSION 0x030705


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/LICENSE.txt View File

@@ -1,6 +1,6 @@
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 59
- 54
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/samples/vst-utilities/moduleinfotool/source/main.cpp View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -35,13 +35,14 @@
// OF THE POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------

#include "public.sdk/source/common/memorystream.h"
#include "public.sdk/source/vst/hosting/module.h"
#include "public.sdk/source/vst/moduleinfo/moduleinfocreator.h"
#include "public.sdk/source/vst/moduleinfo/moduleinfoparser.h"
#include "public.sdk/source/vst/utility/stringconvert.h"
#include "public.sdk/source/common/readfile.h"
#include "base/source/fcommandline.h"
#include "pluginterfaces/vst/vsttypes.h"
#include "pluginterfaces/base/iplugincompatibility.h"
#include "pluginterfaces/base/fplatform.h"
#include <cstdio>
#include <fstream>
#include <iostream>
@@ -73,26 +74,10 @@ void printUsage (std::ostream& s)
s << " moduleinfotool -validate -path MODULE_PATH [-infopath PATH]\n";
}

//------------------------------------------------------------------------
std::string loadFile (const std::string& path)
{
std::ifstream file (path, std::ios_base::in | std::ios_base::binary);
if (!file.is_open ())
return {};
auto size = file.seekg (0, std::ios_base::end).tellg ();
file.seekg (0, std::ios_base::beg);
std::string data;
data.resize (size);
file.read (data.data (), data.size ());
if (file.bad ())
return {};
return data;
}

//------------------------------------------------------------------------
std::optional<ModuleInfo::CompatibilityList> openAndParseCompatJSON (const std::string& path)
{
auto data = loadFile (path);
auto data = readFile (path);
if (data.empty ())
{
std::cout << "Can not read '" << path << "'\n";
@@ -111,35 +96,6 @@ std::optional<ModuleInfo::CompatibilityList> openAndParseCompatJSON (const std::
return result;
}

//------------------------------------------------------------------------
std::optional<ModuleInfo::CompatibilityList> loadCompatibilityFromModule (const VST3::Hosting::Module& module)
{
const auto& factory = module.getFactory();
const auto& infos = factory.classInfos();

const auto iter = std::find_if (infos.begin(), infos.end(), [&] (const auto& info)
{
return info.category() == kPluginCompatibilityClass;
});

if (iter == infos.end())
return {};

const auto compatibility = factory.createInstance<Steinberg::IPluginCompatibility> (iter->ID());

if (compatibility == nullptr)
return {};

Steinberg::MemoryStream stream;

if (compatibility->getCompatibilityJSON (&stream) != kResultOk)
return {};

const std::string_view streamView (stream.getData(), stream.getSize());

return ModuleInfoLib::parseCompatibilityJson (streamView, nullptr);
}

//------------------------------------------------------------------------
int createJSON (const std::optional<ModuleInfo::CompatibilityList>& compat,
const std::string& modulePath, const std::string& moduleVersion,
@@ -155,9 +111,6 @@ int createJSON (const std::optional<ModuleInfo::CompatibilityList>& compat,
auto moduleInfo = ModuleInfoLib::createModuleInfo (*module, false);
if (compat)
moduleInfo.compatibility = *compat;
else if (auto loaded = loadCompatibilityFromModule (*module))
moduleInfo.compatibility = *loaded;

moduleInfo.version = moduleVersion;

std::stringstream output;
@@ -275,7 +228,7 @@ int validate (const std::string& modulePath, std::string infoJsonPath)
infoJsonPath = *path;
}

auto data = loadFile (infoJsonPath);
auto data = readFile (infoJsonPath);
if (data.empty ())
{
std::cerr << "Empty or non existing file: '" << infoJsonPath << "'" << '\n';
@@ -364,13 +317,19 @@ int run (int argc, char* argv[])
if (valueMap.count (optOutputPath) != 0)
{
writeToFile = true;
#if SMTG_OS_WINDOWS
auto tmp = VST3::StringConvert::convert (valueMap[optOutputPath]);
auto outputFile = reinterpret_cast<const wchar_t*> (tmp.data ());
#else
auto outputFile = valueMap[optOutputPath];
#endif
auto ostream = new std::ofstream (outputFile);
if (ostream->is_open ())
outputStream = ostream;
else
{
std::cout << "Cannot create output file: " << outputFile << '\n';
std::cout << "Cannot create output file: " << valueMap[optOutputPath] << '\n';
return result;
}
}
@@ -394,7 +353,53 @@ int run (int argc, char* argv[])
} // Steinberg

//------------------------------------------------------------------------
#if SMTG_OS_WINDOWS
//------------------------------------------------------------------------
#include <Windows.h>
#include <vector>

//------------------------------------------------------------------------
using Utf8String = std::string;

//------------------------------------------------------------------------
using Utf8Args = std::vector<Utf8String>;
Utf8Args toUtf8Args (int argc, wchar_t* wargv[])
{
Utf8Args utf8Args;
for (int i = 0; i < argc; i++)
{
auto str = reinterpret_cast<const Steinberg::Vst::TChar*>(wargv[i]);
utf8Args.push_back (VST3::StringConvert::convert (str));
}

return utf8Args;
}

//------------------------------------------------------------------------
using Utf8ArgPtrs = std::vector<char*>;
Utf8ArgPtrs toUtf8ArgPtrs (Utf8Args& utf8Args)
{
Utf8ArgPtrs utf8ArgPtrs;
for (auto& el : utf8Args)
{
utf8ArgPtrs.push_back (el.data ());
}

return utf8ArgPtrs;
}

//------------------------------------------------------------------------
int wmain (int argc, wchar_t* wargv[])
{
Utf8Args utf8Args = toUtf8Args (argc, wargv);
Utf8ArgPtrs utf8ArgPtrs = toUtf8ArgPtrs (utf8Args);

char** argv = &(utf8ArgPtrs.at (0));
return Steinberg::ModuleInfoTool::run (argc, argv);
}
#else
int main (int argc, char* argv[])
{
return Steinberg::ModuleInfoTool::run (argc, argv);
}
#endif

+ 2
- 2
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -36,7 +36,7 @@

#include "memorystream.h"
#include "pluginterfaces/base/futils.h"
#include <stdlib.h>
#include <cstdlib>

namespace Steinberg {



+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/memorystream.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 2
- 2
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/pluginview.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -51,7 +51,7 @@ class CPluginView : public FObject, public IPlugView
public:
//------------------------------------------------------------------------
CPluginView (const ViewRect* rect = nullptr);
virtual ~CPluginView ();
~CPluginView () SMTG_OVERRIDE;

/** Returns its current frame rectangle. */
const ViewRect& getRect () const { return rect; }


+ 76
- 0
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/readfile.cpp View File

@@ -0,0 +1,76 @@
//-----------------------------------------------------------------------------
// Project : VST SDK
// Flags : clang-format SMTGSequencer
//
// Category : readfile
// Filename : public.sdk/source/common/readfile.cpp
// Created by : Steinberg, 3/2023
// Description : read file routine
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of the Steinberg Media Technologies nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------

#include "readfile.h"
#include "public.sdk/source/vst/utility/stringconvert.h"
#include "pluginterfaces/base/fplatform.h"
#include <fstream>
#include <sstream>

namespace Steinberg {

//------------------------------------------------------------------------
std::string readFile (const std::string& path)
{
#if SMTG_OS_WINDOWS
auto u16Path = VST3::StringConvert::convert (path);
std::ifstream file (reinterpret_cast<const wchar_t*> (u16Path.data ()),
std::ios_base::in | std::ios_base::binary);
#else
std::ifstream file (path, std::ios_base::in | std::ios_base::binary);
#endif
if (!file.is_open ())
return {};

#if SMTG_CPP17
auto size = file.seekg (0, std::ios_base::end).tellg ();
file.seekg (0, std::ios_base::beg);
std::string data;
data.resize (size);
file.read (data.data (), data.size ());
if (file.bad ())
return {};
return data;
#else
std::stringstream buffer;
buffer << file.rdbuf ();
return buffer.str ();
#endif
}

//------------------------------------------------------------------------
} // namespace Steinberg

+ 55
- 0
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/common/readfile.h View File

@@ -0,0 +1,55 @@
//-----------------------------------------------------------------------------
// Flags : clang-format SMTGSequencer
// Project : VST SDK
//
// Category : readfile
// Filename : public.sdk/source/common/readfile.h
// Created by : Steinberg, 3/2023
// Description : read file routine
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of the Steinberg Media Technologies nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------

#pragma once

#include <string>

namespace Steinberg {

//------------------------------------------------------------------------
/** Reads entire file content
\ingroup sdkBase

Returns entire file content at the given path
\endcode
*/
std::string readFile (const std::string& path);

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

} // namespace Steinberg

+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/hostclasses.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/hostclasses.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 3
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -186,6 +186,7 @@ public:
const std::string& getName () const noexcept { return name; }
const std::string& getPath () const noexcept { return path; }
const PluginFactory& getFactory () const noexcept { return factory; }
bool isBundle () const noexcept { return hasBundleStructure; }
//------------------------------------------------------------------------
protected:
virtual ~Module () noexcept = default;
@@ -194,6 +195,7 @@ protected:
PluginFactory factory {nullptr};
std::string name;
std::string path;
bool hasBundleStructure {true};
};

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


+ 15
- 7
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_linux.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -43,23 +43,31 @@
#include <sys/utsname.h>
#include <unistd.h>

#if (__cplusplus >= 201703L)
#if SMTG_CPP17

#if __has_include(<filesystem>)
#define USE_EXPERIMENTAL_FS 0
#elif __has_include(<experimental/filesystem>)
#define USE_EXPERIMENTAL_FS 1
#endif
#else

#else // !SMTG_CPP17

#define USE_EXPERIMENTAL_FS 1
#endif

#endif // SMTG_CPP17

#if USE_EXPERIMENTAL_FS == 1

#include <experimental/filesystem>
namespace filesystem = std::experimental::filesystem;
#else

#else // USE_FILESYSTEM == 0

#include <filesystem>
namespace filesystem = std::filesystem;
#endif

#endif // USE_FILESYSTEM

//------------------------------------------------------------------------
extern "C" {
@@ -347,9 +355,9 @@ Module::SnapshotList Module::getSnapshots (const std::string& modulePath)
//------------------------------------------------------------------------
Optional<std::string> Module::getModuleInfoPath (const std::string& modulePath)
{
SnapshotList result;
filesystem::path path (modulePath);
path /= "Contents";
path /= "Resources";
path /= "moduleinfo.json";
if (filesystem::exists (path))
return {path.generic_string ()};


+ 5
- 5
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_mac.mm View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -373,10 +373,10 @@ Optional<std::string> Module::getModuleInfoPath (const std::string& modulePath)
auto bundleUrl = [NSURL fileURLWithPath:nsString];
if (!bundleUrl)
return {};
auto contentsUrl = [bundleUrl URLByAppendingPathComponent:@"Contents"];
if (!contentsUrl)
return {};
auto moduleInfoUrl = [contentsUrl URLByAppendingPathComponent:@"moduleinfo.json"];
auto moduleInfoUrl = [NSBundle URLForResource:@"moduleinfo"
withExtension:@"json"
subdirectory:nullptr
inBundleWithURL:bundleUrl];
if (!moduleInfoUrl)
return {};
NSError* error = nil;


+ 52
- 15
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_win32.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -93,6 +93,13 @@ namespace {

#define USE_OLE !USE_FILESYSTEM

// for testing only
#if 0 // DEVELOPMENT
#define LOG_ENABLE 1
#else
#define LOG_ENABLE 0
#endif

#if SMTG_PLATFORM_64

#if SMTG_OS_WINDOWS_ARM
@@ -201,13 +208,23 @@ public:
"LoadLibrary failed with error number : " + std::to_string (lastError);
}
}
else
{
hasBundleStructure = false;
}
return instance;
}

//--- -----------------------------------------------------------------------
bool load (const std::string& inPath, std::string& errorDescription) override
{
if (filesystem::is_directory (inPath))
// filesystem::u8path is deprecated in C++20
#if SMTG_CPP20
const filesystem::path tmp (inPath);
#else
const filesystem::path tmp = filesystem::u8path (inPath);
#endif
if (filesystem::is_directory (tmp))
{
// try as package (bundle)
mModule = loadAsPackage (inPath);
@@ -357,6 +374,16 @@ VST3::Optional<filesystem::path> resolveShellLink (const filesystem::path& p)
#endif
}

//------------------------------------------------------------------------
void addToPathList (Module::PathList& pathList, const std::string& toAdd)
{
#if LOG_ENABLE
std::cout << "=> add: " << toAdd << "\n";
#endif

pathList.push_back (toAdd);
}

//------------------------------------------------------------------------
void findFilesWithExt (const filesystem::path& path, const std::string& ext,
Module::PathList& pathList, bool recursive = true)
@@ -382,7 +409,7 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
filesystem::path result;
if (checkVST3Package (finalPath, &result))
{
pathList.push_back (result.generic_string ());
addToPathList (pathList, result.generic_string ());
continue;
}
}
@@ -393,7 +420,7 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
findFilesWithExt (finalPath, ext, pathList, recursive);
}
else if (cpExt == ext)
pathList.push_back (finalPath.generic_string ());
addToPathList (pathList, finalPath.generic_string ());
#else
const auto& cp = p.path ();
const auto& cpExt = cp.extension ();
@@ -405,13 +432,13 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
filesystem::path result;
if (checkVST3Package (p, &result))
{
pathList.push_back (result.generic_u8string ());
addToPathList (pathList, result.generic_u8string ());
continue;
}
findFilesWithExt (cp, ext, pathList, recursive);
}
else
pathList.push_back (cp.generic_u8string ());
addToPathList (pathList, cp.generic_u8string ());
}
else if (recursive)
{
@@ -431,13 +458,13 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
filesystem::path result;
if (checkVST3Package (*resolvedLink, &result))
{
pathList.push_back (result.generic_u8string ());
addToPathList (pathList, result.generic_u8string ());
continue;
}
findFilesWithExt (*resolvedLink, ext, pathList, recursive);
}
else
pathList.push_back (resolvedLink->generic_u8string ());
addToPathList (pathList, resolvedLink->generic_u8string ());
}
else if (filesystem::is_directory (*resolvedLink))
{
@@ -502,18 +529,24 @@ Module::PathList Module::getModulePaths ()
PathList list;
if (auto knownFolder = getKnownFolder (FOLDERID_UserProgramFilesCommon))
{
filesystem::path p (*knownFolder);
p.append ("VST3");
findModules (p, list);
filesystem::path path (*knownFolder);
path.append ("VST3");
#if LOG_ENABLE
std::cout << "Check folder: " << path << "\n";
#endif
findModules (path, list);
}

if (auto knownFolder = getKnownFolder (FOLDERID_ProgramFilesCommon))
{
filesystem::path p (*knownFolder);
p.append ("VST3");
findModules (p, list);
filesystem::path path (*knownFolder);
path.append ("VST3");
#if LOG_ENABLE
std::cout << "Check folder: " << path << "\n";
#endif
findModules (path, list);
}

// find plug-ins located in VST3 (application folder)
WCHAR modulePath[kIPPathNameMax];
GetModuleFileNameW (nullptr, modulePath, kIPPathNameMax);
@@ -521,6 +554,9 @@ Module::PathList Module::getModulePaths ()
filesystem::path path (appPath);
path = path.parent_path ();
path = path.append ("VST3");
#if LOG_ENABLE
std::cout << "Check folder: " << path << "\n";
#endif
findModules (path, list);

return list;
@@ -540,6 +576,7 @@ Optional<std::string> Module::getModuleInfoPath (const std::string& modulePath)
path = Optional<filesystem::path> {p};
}

*path /= "Resources";
*path /= "moduleinfo.json";

if (filesystem::exists (*path))


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/pluginterfacesupport.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/pluginterfacesupport.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 3
- 3
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/jsoncxx.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -81,8 +81,8 @@ struct Iterator
bool operator== (const Iterator& other) const { return other.el == el; }
bool operator!= (const Iterator& other) const { return other.el != el; }

JsonElement operator* () const { return el; }
JsonElement operator-> () const { return el; }
const JsonElement& operator* () const { return el; }
const JsonElement& operator-> () const { return el; }

Iterator& operator++ ()
{


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfo.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 2
- 2
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfocreator.cpp View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -306,4 +306,4 @@ void outputJson (const ModuleInfo& info, std::ostream& output)
}

//------------------------------------------------------------------------
} // Steinberg::ModuelInfoLib
} // Steinberg::ModuleInfoLib

+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfocreator.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 13
- 13
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfoparser.cpp View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -38,8 +38,8 @@
#include "moduleinfoparser.h"
#include "jsoncxx.h"
#include "pluginterfaces/base/ipluginbase.h"
#include <stdexcept>
#include <limits>
#include <stdexcept>

//------------------------------------------------------------------------
namespace Steinberg::ModuleInfoLib {
@@ -141,7 +141,7 @@ struct ModuleInfoJsonParser
uint32_t parsed {0};
if (auto obj = value.asObject ())
{
for (const auto el : *obj)
for (const auto& el : *obj)
{
auto elementName = el.name ().text ();
if (elementName == "Vendor")
@@ -172,7 +172,7 @@ struct ModuleInfoJsonParser
auto flags = el.value ().asObject ();
if (!flags)
throw parse_error ("Expect 'Flags' to be a JSON Object", el.name ());
for (const auto flag : *flags)
for (const auto& flag : *flags)
{
auto flagName = flag.name ().text ();
auto flagValue = flag.value ().asBoolean ();
@@ -229,7 +229,7 @@ struct ModuleInfoJsonParser
auto array = value.asArray ();
if (!array)
throw parse_error ("Expect Classes Array", value);
for (const auto classInfoEl : *array)
for (const auto& classInfoEl : *array)
{
auto classInfo = classInfoEl.value ().asObject ();
if (!classInfo)
@@ -239,7 +239,7 @@ struct ModuleInfoJsonParser

uint32_t parsed {0};

for (const auto el : *classInfo)
for (const auto& el : *classInfo)
{
auto elementName = el.name ().text ();
if (elementName == "CID")
@@ -291,7 +291,7 @@ struct ModuleInfoJsonParser
auto subCatArr = el.value ().asArray ();
if (!subCatArr)
throw parse_error ("Expect Array here", el.value ());
for (const auto catEl : *subCatArr)
for (const auto& catEl : *subCatArr)
{
auto cat = getText (catEl.value ());
ci.subCategories.emplace_back (cat);
@@ -319,13 +319,13 @@ struct ModuleInfoJsonParser
auto snapArr = el.value ().asArray ();
if (!snapArr)
throw parse_error ("Expect Array here", el.value ());
for (const auto snapEl : *snapArr)
for (const auto& snapEl : *snapArr)
{
auto snap = snapEl.value ().asObject ();
if (!snap)
throw parse_error ("Expect Object here", snapEl.value ());
ModuleInfo::Snapshot snapshot;
for (const auto spEl : *snap)
for (const auto& spEl : *snap)
{
auto spElName = spEl.name ().text ();
if (spElName == "Path")
@@ -369,14 +369,14 @@ struct ModuleInfoJsonParser
auto arr = value.asArray ();
if (!arr)
throw parse_error ("Expect Array here", value);
for (const auto el : *arr)
for (const auto& el : *arr)
{
auto obj = el.value ().asObject ();
if (!obj)
throw parse_error ("Expect Object here", el.value ());

ModuleInfo::Compatibility compat;
for (const auto objEl : *obj)
for (const auto& objEl : *obj)
{
auto elementName = objEl.name ().text ();
if (elementName == "New")
@@ -386,7 +386,7 @@ struct ModuleInfoJsonParser
auto oldElArr = objEl.value ().asArray ();
if (!oldElArr)
throw parse_error ("Expect Array here", objEl.value ());
for (const auto old : *oldElArr)
for (const auto& old : *oldElArr)
{
compat.oldCID.emplace_back (getText (old.value ()));
}
@@ -416,7 +416,7 @@ struct ModuleInfoJsonParser
};

uint32_t parsed {0};
for (const auto el : *docObj)
for (const auto& el : *docObj)
{
auto elementName = el.name ().text ();
if (elementName == "Name")


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/moduleinfo/moduleinfoparser.h View File

@@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/optional.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/stringconvert.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 17
- 2
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/stringconvert.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -120,7 +120,7 @@ extern std::string convert (const std::u16string& str);
extern std::string convert (const char* str, uint32_t max);

//------------------------------------------------------------------------
} // String
} // StringConvert

//------------------------------------------------------------------------
inline const Steinberg::Vst::TChar* toTChar (const std::u16string& str)
@@ -128,5 +128,20 @@ inline const Steinberg::Vst::TChar* toTChar (const std::u16string& str)
return reinterpret_cast<const Steinberg::Vst::TChar*> (str.data ());
}

//------------------------------------------------------------------------
/**
* convert an number to an UTF-16 string
*
* @param value number
*
* @return UTF-16 string
*/
template<typename NumberT>
std::u16string toString (NumberT value)
{
auto u8str = std::to_string (value);
return StringConvert::convert (u8str);
}

//------------------------------------------------------------------------
} // VST3

+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/utility/uid.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 3
- 2
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstbus.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -50,7 +50,8 @@ Bus::Bus (const TChar* _name, BusType _busType, int32 _flags)
//------------------------------------------------------------------------
bool Bus::getInfo (BusInfo& info)
{
name.copyTo16 (info.name, 0, str16BufferSize (info.name) - 1);
memset (info.name, 0, sizeof (String128));
name.copy (info.name, 128);
info.busType = busType;
info.flags = flags;
return true;


+ 12
- 4
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstbus.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -37,10 +37,13 @@
#pragma once

#include "base/source/fobject.h"
#include "base/source/fstring.h"
#include "pluginterfaces/vst/ivstcomponent.h"
#include "pluginterfaces/vst/ivstaudioprocessor.h"

#include <string>
#if SMTG_CPP_17
#include <string_view>
#endif
#include <vector>

//------------------------------------------------------------------------
@@ -64,8 +67,13 @@ public:
/** Activates the bus. */
void setActive (TBool state) { active = state; }

#if SMTG_CPP_17
/** Sets a new name for this bus. */
void setName (String newName) { name = newName; }
void setName (std::u16string_view newName) { name = newName; }
#else
/** Sets a new name for this bus. */
void setName (const std::u16string& newName) { name = newName; }
#endif

/** Sets a new busType for this bus. */
void setBusType (BusType newBusType) { busType = newBusType; }
@@ -79,7 +87,7 @@ public:
OBJ_METHODS (Vst::Bus, FObject)
//------------------------------------------------------------------------
protected:
String name; ///< name
std::u16string name; ///< name
BusType busType; ///< kMain or kAux, see \ref BusTypes
int32 flags; ///< flags, see \ref BusInfo::BusFlags
TBool active; ///< activation state


+ 2
- 2
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponent.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -70,7 +70,7 @@ BusList* Component::getBusList (MediaType type, BusDirection dir)
{
if (type == kAudio)
return dir == kInput ? &audioInputs : &audioOutputs;
else if (type == kEvent)
if (type == kEvent)
return dir == kInput ? &eventInputs : &eventOutputs;
return nullptr;
}


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponent.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponentbase.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstcomponentbase.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 11
- 6
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vsteditcontroller.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -349,6 +349,8 @@ bool EditControllerEx1::addUnit (Unit* unit)
//------------------------------------------------------------------------
tresult PLUGIN_API EditControllerEx1::getUnitInfo (int32 unitIndex, UnitInfo& info /*out*/)
{
if (unitIndex < 0 || unitIndex >= static_cast<int32> (units.size ()))
return kResultFalse;
if (Unit* unit = units.at (unitIndex))
{
info = unit->getInfo ();
@@ -559,9 +561,10 @@ tresult ProgramList::getProgramInfo (int32 programIndex, CString attributeId,
StringMap::const_iterator it = programInfos[programIndex].find (attributeId);
if (it != programInfos[programIndex].end ())
{
if (!it->second.isEmpty ())
if (!it->second.empty ())
{
it->second.copyTo16 (value, 0, 128);
memset (value, 0, sizeof (String128));
it->second.copy (value, 128);
return kResultTrue;
}
}
@@ -574,7 +577,8 @@ tresult ProgramList::getProgramName (int32 programIndex, String128 name /*out*/)
{
if (programIndex >= 0 && programIndex < static_cast<int32> (programNames.size ()))
{
programNames.at (programIndex).copyTo16 (name, 0, 128);
memset (name, 0, sizeof (String128));
programNames.at (programIndex).copy (name, 128);
return kResultTrue;
}
return kResultFalse;
@@ -606,7 +610,7 @@ Parameter* ProgramList::getParameter ()
unitId);
for (const auto& programName : programNames)
{
listParameter->appendString (programName);
listParameter->appendString (programName.data ());
}
parameter = listParameter;
}
@@ -684,7 +688,8 @@ tresult ProgramListWithPitchNames::getPitchName (int32 programIndex, int16 midiP
PitchNameMap::const_iterator it = pitchNames[programIndex].find (midiPitch);
if (it != pitchNames[programIndex].end ())
{
it->second.copyTo16 (name, 0, 128);
memset (name, 0, sizeof (String128));
it->second.copy (name, 128);
return kResultTrue;
}
}


+ 6
- 6
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vsteditcontroller.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -39,13 +39,13 @@
#include "public.sdk/source/vst/vstcomponentbase.h"
#include "public.sdk/source/vst/vstparameters.h"
#include "public.sdk/source/common/pluginview.h"
#include "base/source/fstring.h"

#include "pluginterfaces/vst/ivsteditcontroller.h"
#include "pluginterfaces/vst/ivstunits.h"

#include <vector>
#include <map>
#include <string>
#include <vector>

//------------------------------------------------------------------------
namespace Steinberg {
@@ -241,8 +241,8 @@ public:
OBJ_METHODS (ProgramList, FObject)
//------------------------------------------------------------------------
protected:
using StringMap = std::map<String, String>;
using StringVector = std::vector<String>;
using StringMap = std::map<std::string, std::u16string>;
using StringVector = std::vector<std::u16string>;
using ProgramInfoVector = std::vector<StringMap>;
ProgramListInfo info;
UnitID unitId;
@@ -275,7 +275,7 @@ public:

OBJ_METHODS (ProgramListWithPitchNames, ProgramList)
protected:
using PitchNameMap = std::map<int16, String>;
using PitchNameMap = std::map<int16, std::u16string>;
using PitchNamesVector = std::vector<PitchNameMap>;
PitchNamesVector pitchNames;
};


+ 1
- 1
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstinitiids.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:


+ 13
- 9
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstparameters.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -45,14 +45,13 @@ namespace Vst {
//------------------------------------------------------------------------
// Parameter Implementation
//------------------------------------------------------------------------
Parameter::Parameter () : valueNormalized (0.), precision (4)
Parameter::Parameter ()
{
info = {};
}

//------------------------------------------------------------------------
Parameter::Parameter (const ParameterInfo& info)
: info (info), valueNormalized (info.defaultNormalizedValue), precision (4)
: info (info), valueNormalized (info.defaultNormalizedValue)
{
}

@@ -60,10 +59,7 @@ Parameter::Parameter (const ParameterInfo& info)
Parameter::Parameter (const TChar* title, ParamID tag, const TChar* units,
ParamValue defaultValueNormalized, int32 stepCount, int32 flags,
UnitID unitID, const TChar* shortTitle)
: precision (4)
{
info = {};

UString (info.title, str16BufferSize (String128)).assign (title);
if (units)
UString (info.units, str16BufferSize (String128)).assign (units);
@@ -302,7 +298,7 @@ bool StringListParameter::replaceString (int32 index, const String128 string)
//------------------------------------------------------------------------
void StringListParameter::toString (ParamValue _valueNormalized, String128 string) const
{
int32 index = (int32)toPlain (_valueNormalized);
int32 index = static_cast<int32> (toPlain (_valueNormalized));
if (const TChar* valueString = strings.at (index))
{
UString (string, str16BufferSize (String128)).assign (valueString);
@@ -345,7 +341,7 @@ ParamValue StringListParameter::toNormalized (ParamValue plainValue) const
//------------------------------------------------------------------------
// ParameterContainer Implementation
//------------------------------------------------------------------------
ParameterContainer::ParameterContainer () : params (nullptr)
ParameterContainer::ParameterContainer ()
{
}

@@ -389,6 +385,14 @@ Parameter* ParameterContainer::addParameter (const ParameterInfo& info)
return nullptr;
}

//------------------------------------------------------------------------
Parameter* ParameterContainer::getParameterByIndex (int32 index) const
{
if (!params || index < 0 || index >= static_cast<int32> (params->size ()))
return nullptr;
return params->at (index);
}

//------------------------------------------------------------------------
Parameter* ParameterContainer::getParameter (ParamID tag) const
{


+ 6
- 6
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstparameters.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -98,9 +98,9 @@ public:
OBJ_METHODS (Parameter, FObject)
//------------------------------------------------------------------------
protected:
ParameterInfo info;
ParamValue valueNormalized;
int32 precision;
ParameterInfo info {0};
ParamValue valueNormalized {0.};
int32 precision {4};
};

//------------------------------------------------------------------------
@@ -212,7 +212,7 @@ public:
int32 getParameterCount () const { return params ? static_cast<int32> (params->size ()) : 0; }

/** Gets parameter by index. */
Parameter* getParameterByIndex (int32 index) const { return params ? params->at (index) : nullptr; }
Parameter* getParameterByIndex (int32 index) const;

/** Removes all parameters. */
void removeAll ()
@@ -231,7 +231,7 @@ public:
protected:
using ParameterPtrVector = std::vector<IPtr<Parameter>>;
using IndexMap = std::map<ParamID, ParameterPtrVector::size_type>;
ParameterPtrVector* params;
ParameterPtrVector* params {nullptr};
IndexMap id2index;
};



+ 3
- 3
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.cpp View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -176,7 +176,7 @@ bool PresetFile::loadPreset (IBStream* stream, const FUID& classID, IComponent*
}

//------------------------------------------------------------------------
PresetFile::PresetFile (IBStream* stream) : stream (stream), entryCount (0)
PresetFile::PresetFile (IBStream* stream) : stream (stream)
{
memset (entries, 0, sizeof (entries));

@@ -780,7 +780,7 @@ tresult PLUGIN_API ReadOnlyBStream::read (void* buffer, int32 numBytes, int32* n
if (!sourceStream)
return kNotInitialized;

int32 maxBytesToRead = (int32) (sectionSize - seekPosition);
int32 maxBytesToRead = static_cast<int32> (sectionSize - seekPosition);
if (numBytes > maxBytesToRead)
numBytes = maxBytesToRead;
if (numBytes <= 0)


+ 3
- 3
modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/vstpresetfile.h View File

@@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2022, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
//-----------------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
@@ -124,7 +124,7 @@ public:
TSize size;
};

IBStream* getStream () { return stream; } ///< Returns the associated stream.
IBStream* getStream () const { return stream; } ///< Returns the associated stream.

const FUID& getClassID () const { return classID; } ///< Returns the associated classID (component ID: Processor part (not the controller!)).
void setClassID (const FUID& uid) { classID = uid; }///< Sets the associated classID (component ID: Processor part (not the controller!)).
@@ -223,7 +223,7 @@ protected:
FUID classID; ///< classID is the FUID of the component (processor) part
enum { kMaxEntries = 128 };
Entry entries[kMaxEntries];
int32 entryCount;
int32 entryCount {0};
};

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


+ 1
- 0
modules/juce_audio_processors/format_types/juce_VST3Headers.h View File

@@ -92,6 +92,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-W#warnings",
#include <pluginterfaces/base/conststringtable.h>
#include <pluginterfaces/base/funknown.h>
#include <pluginterfaces/base/ipluginbase.h>
#include <pluginterfaces/base/iplugincompatibility.h>
#include <pluginterfaces/base/ustring.h>
#include <pluginterfaces/gui/iplugview.h>
#include <pluginterfaces/gui/iplugviewcontentscalesupport.h>


Loading…
Cancel
Save