1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00

VST3: Update SDK to 3.7.11

This commit is contained in:
reuk 2024-05-30 11:48:41 +01:00
parent eafbfee336
commit a87126227f
76 changed files with 927 additions and 477 deletions

View file

@ -1748,6 +1748,8 @@ private:
#endif
}
~JuceVST3Editor() override = default; // NOLINT
tresult PLUGIN_API queryInterface (const TUID targetIID, void** obj) override
{
const auto result = testFor (*this, targetIID, UniqueBase<IPlugViewContentScaleSupport>{});
@ -1758,7 +1760,9 @@ private:
return Vst::EditorView::queryInterface (targetIID, obj);
}
// NOLINTBEGIN
REFCOUNT_METHODS (Vst::EditorView)
// NOLINTEND
//==============================================================================
tresult PLUGIN_API isPlatformTypeSupported (FIDString type) override

View file

@ -1,6 +1,6 @@
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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

View file

@ -19,10 +19,10 @@
- VST 3 API
- VST 3 Implementation Helper Classes
- AAX, AU, AUv3 and VST 2 wrappers
- AAX, AUv3 and AU Wrappers
- VST 3 plug-ins Examples
The full VST 3 SDK is available [here!](https://www.steinberg.net/en/company/developers.html). It contains :
The full VST 3 SDK is available [here!](https://www.steinberg.net/en/company/developers.html). It contains:
- VST 3 plug-in Test Host Application/Validator,
- the **Steinberg VST 3 Plug-In SDK Licensing Agreement** that you have to sign if you want to develop or host **VST 3** plug-ins.
@ -146,25 +146,6 @@ Some more features implemented specifically for developers include:
git clone --recursive https://github.com/steinbergmedia/vst3sdk.git
```
### Adding VST2 version
The **VST 2 SDK** is not part anymore of the **VST 3 SDK**, you have to use an older version of the SDK and copy the vst2sdk folder into the VST_SDK folder.
In order to build a VST2 version of the plug-in and a VST3 at the same time, you need to copy the VST2 folder into the VST3 folder, simply run the following commands:
- for macOS:
```c
cd TheFolderWhereYouDownloadTheSDK
./copy_vst2_to_vst3_sdk.sh
```
- for Windows:
```c
cd TheFolderWhereYouDownloadTheSDK
copy_vst2_to_vst3_sdk.bat
```
### Build the examples on Windows
- Create a folder for the build and move to this folder (using cd):
@ -192,6 +173,7 @@ msbuild.exe vstsdk.sln
// (or alternatively for example for release)
cmake --build . --config Release
```
Note: If you have any issue with symbolic links, check [Preparation on Windows](https://steinbergmedia.github.io/vst3_dev_portal/pages/Getting+Started/Preparation+on+Windows.html) for potential solutions.
### Build the examples on macOS

View file

@ -1,6 +1,6 @@
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,36 +9,36 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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,
//
// * 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
// 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
// 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
// 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.
//-----------------------------------------------------------------------------
//------------------------------------------------------------------------
/** @file base/source/fcommandline.h
Very simple command-line parser.
@see Steinberg::CommandLine */
Very simple command-line parser.
@see Steinberg::CommandLine */
//------------------------------------------------------------------------
#pragma once
@ -57,310 +57,336 @@ namespace Steinberg {
Parses the command-line into a CommandLine::VariablesMap.\n
The command-line parser uses CommandLine::Descriptions to define the available options.
@b Example:
@b Example:
\code
#include "base/source/fcommandline.h"
#include <iostream>
int main (int argc, char* argv[])
{
using namespace std;
using namespace std;
CommandLine::Descriptions desc;
CommandLine::VariablesMap valueMap;
CommandLine::Descriptions desc;
CommandLine::VariablesMap valueMap;
desc.addOptions ("myTool")
("help", "produce help message")
("opt1", string(), "option 1")
("opt2", string(), "option 2")
;
CommandLine::parse (argc, argv, desc, valueMap);
desc.addOptions ("myTool")
("help", "produce help message")
("opt1", string(), "option 1")
("opt2", string(), "option 2")
;
CommandLine::parse (argc, argv, desc, valueMap);
if (valueMap.hasError () || valueMap.count ("help"))
{
cout << desc << "\n";
return 1;
}
if (valueMap.count ("opt1"))
{
cout << "Value of option 1 " << valueMap["opt1"] << "\n";
}
if (valueMap.count ("opt2"))
{
cout << "Value of option 2 " << valueMap["opt2"] << "\n";
}
return 0;
if (valueMap.hasError () || valueMap.count ("help"))
{
cout << desc << "\n";
return 1;
}
if (valueMap.count ("opt1"))
{
cout << "Value of option 1 " << valueMap["opt1"] << "\n";
}
if (valueMap.count ("opt2"))
{
cout << "Value of option 2 " << valueMap["opt2"] << "\n";
}
return 0;
}
\endcode
@note
This is a "header only" implementation.\n
If you need the declarations in more than one cpp file, you have to define
If you need the declarations in more than one cpp file, you have to define
@c SMTG_NO_IMPLEMENTATION in all but one file.
*/
//------------------------------------------------------------------------
namespace CommandLine {
//------------------------------------------------------------------------
/** Command-line parsing result.
This is the result of the parser.\n
- Use hasError() to check for errors.\n
- To test if a option was specified on the command-line use: count()\n
- To retrieve the value of an options, use operator [](const VariablesMapContainer::key_type k)\n
*/
//------------------------------------------------------------------------
class VariablesMap
{
bool mParaError;
using VariablesMapContainer = std::map<std::string, std::string>;
VariablesMapContainer mVariablesMapContainer;
public:
VariablesMap () : mParaError (false) {} ///< Constructor. Creates a empty VariablesMap.
bool hasError () const { return mParaError; } ///< Returns @c true when an error has occurred.
void setError () { mParaError = true; } ///< Sets the error state to @c true.
std::string& operator [](const VariablesMapContainer::key_type k); ///< Retrieve the value of option @c k.
const std::string& operator [](const VariablesMapContainer::key_type k) const; ///< Retrieve the value of option @c k.
VariablesMapContainer::size_type count (const VariablesMapContainer::key_type k) const; ///< Returns @c != @c 0 if command-line contains option @c k.
};
//! type of the list of elements on the command line that are not handled by options parsing
using FilesVector = std::vector<std::string>;
//------------------------------------------------------------------------
/** Command-line parsing result.
This is the result of the parser.\n
- Use hasError() to check for errors.\n
- To test if a option was specified on the command-line use: count()\n
- To retrieve the value of an options, use operator [](const VariablesMapContainer::key_type
k)\n
*/
//------------------------------------------------------------------------
class VariablesMap
{
bool mParaError;
using VariablesMapContainer = std::map<std::string, std::string>;
VariablesMapContainer mVariablesMapContainer;
//------------------------------------------------------------------------
/** The description of one single command-line option.
Normally you rarely use a Description directly.\n
In most cases you will use the Descriptions::addOptions (const std::string&) method to create and add descriptions.
*/
//------------------------------------------------------------------------
class Description : public std::string
{
public:
Description (const std::string& name, const std::string& help, const std::string& valueType ); ///< Construct a Description
std::string mHelp; ///< The help string for this option.
std::string mType; ///< The type of this option (kBool, kString).
static const std::string kBool;
static const std::string kString;
};
//------------------------------------------------------------------------
/** List of command-line option descriptions.
public:
VariablesMap () : mParaError (false) {} ///< Constructor. Creates a empty VariablesMap.
bool hasError () const { return mParaError; } ///< Returns @c true when an error has occurred.
void setError () { mParaError = true; } ///< Sets the error state to @c true.
Use addOptions(const std::string&) to add Descriptions.
*/
//------------------------------------------------------------------------
class Descriptions
{
using DescriptionsList = std::deque<Description>;
DescriptionsList mDescriptions;
std::string mCaption;
public:
/** Sets the command-line tool caption and starts adding Descriptions. */
Descriptions& addOptions (const std::string& caption = "",
std::initializer_list<Description>&& options = {});
/** Parse the command-line. */
bool parse (int ac, char* av[], VariablesMap& result, FilesVector* files = nullptr) const;
/** Print a brief description for the command-line tool into the stream @c os. */
void print (std::ostream& os) const;
/** Add a new switch. Only */
Descriptions& operator() (const std::string& name, const std::string& help);
/** Add a new option of type @c inType. Currently only std::string is supported. */
template <typename Type>
Descriptions& operator () (const std::string& name, const Type& inType, std::string help);
};
/** Retrieve the value of option @c k.*/
std::string& operator[] (const VariablesMapContainer::key_type k);
/** Retrieve the value of option @c k. */
const std::string& operator[] (const VariablesMapContainer::key_type k) const;
/** Returns @c != @c 0 if command-line contains option @c k. */
VariablesMapContainer::size_type count (const VariablesMapContainer::key_type k) const;
};
//! type of the list of elements on the command line that are not handled by options parsing
using FilesVector = std::vector<std::string>;
//------------------------------------------------------------------------
/** The description of one single command-line option.
Normally you rarely use a Description directly.\n
In most cases you will use the Descriptions::addOptions (const std::string&) method to create
and add descriptions.
*/
//------------------------------------------------------------------------
class Description : public std::string
{
public:
/** Construct a Description */
Description (const std::string& name, const std::string& help,
const std::string& valueType);
std::string mHelp; ///< The help string for this option.
std::string mType; ///< The type of this option (kBool, kString).
static const std::string kBool;
static const std::string kString;
};
//------------------------------------------------------------------------
/** List of command-line option descriptions.
Use addOptions (const std::string&) to add Descriptions.
*/
//------------------------------------------------------------------------
class Descriptions
{
using DescriptionsList = std::deque<Description>;
DescriptionsList mDescriptions;
std::string mCaption;
public:
/** Sets the command-line tool caption and starts adding Descriptions. */
Descriptions& addOptions (const std::string& caption = "",
std::initializer_list<Description>&& options = {});
/** Parse the command-line. */
bool parse (int ac, char* av[], VariablesMap& result, FilesVector* files = nullptr) const;
/** Print a brief description for the command-line tool into the stream @c os. */
void print (std::ostream& os) const;
/** Add a new switch. Only */
Descriptions& operator () (const std::string& name, const std::string& help);
/** Add a new option of type @c inType. Currently only std::string is supported. */
template <typename Type>
Descriptions& operator () (const std::string& name, const Type& inType, std::string help);
};
//------------------------------------------------------------------------
// If you need the declarations in more than one cpp file you have to define
// SMTG_NO_IMPLEMENTATION in all but one file.
//------------------------------------------------------------------------
#ifndef SMTG_NO_IMPLEMENTATION
//------------------------------------------------------------------------
/*! If command-line contains option @c k more than once, only the last value will survive. */
//------------------------------------------------------------------------
std::string& VariablesMap::operator [](const VariablesMapContainer::key_type k)
{
return mVariablesMapContainer[k];
}
//------------------------------------------------------------------------
/*! If command-line contains option @c k more than once, only the last value will survive. */
//------------------------------------------------------------------------
const std::string& VariablesMap::operator [](const VariablesMapContainer::key_type k) const
{
return (*const_cast<VariablesMap*>(this))[k];
}
//------------------------------------------------------------------------
VariablesMap::VariablesMapContainer::size_type VariablesMap::count (const VariablesMapContainer::key_type k) const
{
return mVariablesMapContainer.count (k);
}
//------------------------------------------------------------------------
/** Add a new option with a string as parameter. */
//------------------------------------------------------------------------
template <> Descriptions& Descriptions::operator() (const std::string& name, const std::string& inType, std::string help)
{
mDescriptions.emplace_back (name, help, inType);
return *this;
}
bool parse (int ac, char* av[], const Descriptions& desc, VariablesMap& result, FilesVector* files = nullptr); ///< Parse the command-line.
std::ostream& operator<< (std::ostream& os, const Descriptions& desc); ///< Make Descriptions stream able.
const std::string Description::kBool = "bool";
const std::string Description::kString = "string";
//------------------------------------------------------------------------
/*! In most cases you will use the Descriptions::addOptions (const std::string&) method to create and add descriptions.
@param[in] name of the option.
@param[in] help a help description for this option.
@param[out] valueType Description::kBool or Description::kString.
*/
Description::Description (const std::string& name, const std::string& help, const std::string& valueType)
: std::string (name)
, mHelp (help)
, mType (valueType)
{
}
//------------------------------------------------------------------------
/*! If command-line contains option @c k more than once, only the last value will survive. */
//------------------------------------------------------------------------
std::string& VariablesMap::operator[] (const VariablesMapContainer::key_type k)
{
return mVariablesMapContainer[k];
}
//------------------------------------------------------------------------
/*! Returning a reference to *this, enables chaining of calls to operator()(const std::string&,
const std::string&).
@param[in] name of the added option.
@param[in] help a help description for this option.
@return a reference to *this.
*/
Descriptions& Descriptions::operator () (const std::string& name, const std::string& help)
{
mDescriptions.emplace_back (name, help, Description::kBool);
return *this;
}
/*! If command-line contains option @c k more than once, only the last value will survive. */
//------------------------------------------------------------------------
const std::string& VariablesMap::operator[] (const VariablesMapContainer::key_type k) const
{
return (*const_cast<VariablesMap*> (this))[k];
}
//------------------------------------------------------------------------
/*! <b>Usage example:</b>
@code
CommandLine::Descriptions desc;
desc.addOptions ("myTool") // Set caption to "myTool"
("help", "produce help message") // add switch -help
("opt1", string(), "option 1") // add string option -opt1
("opt2", string(), "option 2") // add string option -opt2
;
@endcode
@note
The operator() is used for every additional option.
Or with initializer list :
@code
CommandLine::Descriptions desc;
desc.addOptions ("myTool", // Set caption to "myTool"
{{"help", "produce help message", Description::kBool}, // add switch -help
{"opt1", "option 1", Description::kString}, // add string option -opt1
{"opt2", "option 2", Description::kString}} // add string option -opt2
);
@endcode
@param[in] caption the caption of the command-line tool.
@param[in] options initializer list with options
@return a reverense to *this.
*/
Descriptions& Descriptions::addOptions (const std::string& caption,
std::initializer_list<Description>&& options)
{
mCaption = caption;
std::move (options.begin (), options.end (), std::back_inserter (mDescriptions));
return *this;
}
//------------------------------------------------------------------------
/*! @param[in] ac count of command-line parameters
@param[in] av command-line as array of strings
@param[out] result the parsing result
@param[out] files optional list of elements on the command line that are not handled by options parsing
*/
bool Descriptions::parse (int ac, char* av[], VariablesMap& result, FilesVector* files) const
{
using namespace std;
for (int i = 1; i < ac; i++)
{
string current = av[i];
if (current[0] == '-')
{
int pos = current[1] == '-' ? 2 : 1;
current = current.substr (pos, string::npos);
DescriptionsList::const_iterator found =
find (mDescriptions.begin (), mDescriptions.end (), current);
if (found != mDescriptions.end ())
{
result[*found] = "true";
if (found->mType != Description::kBool)
{
if (((i + 1) < ac) && *av[i + 1] != '-')
{
result[*found] = av[++i];
}
else
{
result[*found] = "error!";
result.setError ();
return false;
}
}
}
else
{
result.setError ();
return false;
}
}
else if (files)
files->push_back (av[i]);
}
return true;
}
VariablesMap::VariablesMapContainer::size_type VariablesMap::count (
const VariablesMapContainer::key_type k) const
{
return mVariablesMapContainer.count (k);
}
//------------------------------------------------------------------------
/*! The description includes the help strings for all options. */
//------------------------------------------------------------------------
void Descriptions::print (std::ostream& os) const
{
if (!mCaption.empty ())
os << mCaption << ":\n";
/** Add a new option with a string as parameter. */
//------------------------------------------------------------------------
template <>
Descriptions& Descriptions::operator () (const std::string& name, const std::string& inType,
std::string help)
{
mDescriptions.emplace_back (name, help, inType);
return *this;
}
size_t maxLength = 0u;
std::for_each (mDescriptions.begin (), mDescriptions.end (),
[&] (const Description& d) { maxLength = std::max (maxLength, d.size ()); });
/** Parse the command - line. */
bool parse (int ac, char* av[], const Descriptions& desc, VariablesMap& result,
FilesVector* files = nullptr);
for (const Description& opt : mDescriptions)
{
os << "-" << opt;
for (auto s = opt.size (); s < maxLength; ++s)
os << " ";
os << " | " << opt.mHelp << "\n";
}
}
/** Make Descriptions stream able. */
std::ostream& operator<< (std::ostream& os, const Descriptions& desc);
const std::string Description::kBool = "bool";
const std::string Description::kString = "string";
//------------------------------------------------------------------------
std::ostream& operator<< (std::ostream& os, const Descriptions& desc)
/*! In most cases you will use the Descriptions::addOptions (const std::string&) method to create
and add descriptions.
@param[in] name of the option.
@param[in] help a help description for this option.
@param[out] valueType Description::kBool or Description::kString.
*/
Description::Description (const std::string& name, const std::string& help,
const std::string& valueType)
: std::string (name), mHelp (help), mType (valueType)
{
}
//------------------------------------------------------------------------
/*! Returning a reference to *this, enables chaining of calls to operator()(const std::string&,
const std::string&).
@param[in] name of the added option.
@param[in] help a help description for this option.
@return a reference to *this.
*/
Descriptions& Descriptions::operator () (const std::string& name, const std::string& help)
{
mDescriptions.emplace_back (name, help, Description::kBool);
return *this;
}
//------------------------------------------------------------------------
/*! <b>Usage example:</b>
@code
CommandLine::Descriptions desc;
desc.addOptions ("myTool") // Set caption to "myTool"
("help", "produce help message") // add switch -help
("opt1", string(), "option 1") // add string option -opt1
("opt2", string(), "option 2") // add string option -opt2
;
@endcode
@note
The operator() is used for every additional option.
Or with initializer list :
@code
CommandLine::Descriptions desc;
desc.addOptions ("myTool", // Set caption to "myTool"
{{"help", "produce help message", Description::kBool}, // add switch -help
{"opt1", "option 1", Description::kString}, // add string option -opt1
{"opt2", "option 2", Description::kString}} // add string option -opt2
);
@endcode
@param[in] caption the caption of the command-line tool.
@param[in] options initializer list with options
@return a reverense to *this.
*/
Descriptions& Descriptions::addOptions (const std::string& caption,
std::initializer_list<Description>&& options)
{
mCaption = caption;
std::move (options.begin (), options.end (), std::back_inserter (mDescriptions));
return *this;
}
//------------------------------------------------------------------------
/*! @param[in] ac count of command-line parameters
@param[in] av command-line as array of strings
@param[out] result the parsing result
@param[out] files optional list of elements on the command line that are not handled by options
parsing
*/
bool Descriptions::parse (int ac, char* av[], VariablesMap& result, FilesVector* files) const
{
using namespace std;
for (int i = 1; i < ac; i++)
{
desc.print (os);
return os;
}
string current = av[i];
if (current[0] == '-')
{
int pos = current[1] == '-' ? 2 : 1;
current = current.substr (pos, string::npos);
//------------------------------------------------------------------------
/*! @param[in] ac count of command-line parameters
@param[in] av command-line as array of strings
@param[in] desc Descriptions including all allowed options
@param[out] result the parsing result
@param[out] files optional list of elements on the command line that are not handled by options parsing
*/
bool parse (int ac, char* av[], const Descriptions& desc, VariablesMap& result, FilesVector* files)
{
return desc.parse (ac, av, result, files);
DescriptionsList::const_iterator found =
find (mDescriptions.begin (), mDescriptions.end (), current);
if (found != mDescriptions.end ())
{
result[*found] = "true";
if (found->mType != Description::kBool)
{
if (((i + 1) < ac) && *av[i + 1] != '-')
{
result[*found] = av[++i];
}
else
{
result[*found] = "error!";
result.setError ();
return false;
}
}
}
else
{
result.setError ();
return false;
}
}
else if (files)
files->push_back (av[i]);
}
return true;
}
//------------------------------------------------------------------------
/*! The description includes the help strings for all options. */
//------------------------------------------------------------------------
void Descriptions::print (std::ostream& os) const
{
if (!mCaption.empty ())
os << mCaption << ":\n";
size_t maxLength = 0u;
std::for_each (mDescriptions.begin (), mDescriptions.end (),
[&] (const Description& d) { maxLength = std::max (maxLength, d.size ()); });
for (const Description& opt : mDescriptions)
{
os << "-" << opt;
for (auto s = opt.size (); s < maxLength; ++s)
os << " ";
os << " | " << opt.mHelp << "\n";
}
}
//------------------------------------------------------------------------
std::ostream& operator<< (std::ostream& os, const Descriptions& desc)
{
desc.print (os);
return os;
}
//------------------------------------------------------------------------
/*! @param[in] ac count of command-line parameters
@param[in] av command-line as array of strings
@param[in] desc Descriptions including all allowed options
@param[out] result the parsing result
@param[out] files optional list of elements on the command line that are not handled by options
parsing
*/
bool parse (int ac, char* av[], const Descriptions& desc, VariablesMap& result, FilesVector* files)
{
return desc.parse (ac, av, result, files);
}
#endif
} //namespace CommandLine
} //namespace Steinberg
//------------------------------------------------------------------------
} // namespace CommandLine
} // namespace Steinberg

View file

@ -11,7 +11,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -11,7 +11,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -10,7 +10,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -125,6 +125,9 @@ public:
// static helper functions
static inline bool classIDsEqual (FClassID ci1, FClassID ci2); ///< compares (evaluates) 2 class IDs
static inline FObject* unknownToObject (FUnknown* unknown); ///< pointer conversion from FUnknown to FObject
/** convert from FUnknown to FObject */
template <class Class>
static inline IPtr<Class> fromUnknown (FUnknown* unknown);
/** Special UID that is used to cast an FUnknown pointer to a FObject */
static const FUID iid;
@ -140,7 +143,24 @@ protected:
//------------------------------------------------------------------------
// conversion from FUnknown to FObject
// conversion from FUnknown to FObject subclass
//------------------------------------------------------------------------
template <class C>
inline IPtr<C> FObject::fromUnknown (FUnknown* unknown)
{
if (unknown)
{
FObject* object = nullptr;
if (unknown->queryInterface (FObject::iid, (void**)&object) == kResultTrue && object)
{
if (object->isTypeOf (C::getFClassID (), true))
return IPtr<C> (static_cast<C*> (object), false);
object->release ();
}
}
return {};
}
//------------------------------------------------------------------------
inline FObject* FObject::unknownToObject (FUnknown* unknown)
{
@ -149,7 +169,10 @@ inline FObject* FObject::unknownToObject (FUnknown* unknown)
{
unknown->queryInterface (FObject::iid, (void**)&object);
if (object)
object->release (); // queryInterface has added ref
{
if (object->release () == 0)
object = nullptr;
}
}
return object;
}
@ -168,7 +191,7 @@ inline C* FCast (const FObject* object)
{
if (object && object->isTypeOf (C::getFClassID (), true))
return (C*) object;
return 0;
return nullptr;
}
//-----------------------------------------------------------------------
@ -182,19 +205,48 @@ inline C* FCast (FUnknown* unknown)
}
//-----------------------------------------------------------------------
/** FUCast - casting from FUnknown to Interface */
/** ICast - casting from FObject to FUnknown Interface */
//-----------------------------------------------------------------------
template<class I>
inline IPtr<I> ICast (FObject* object)
{
return FUnknownPtr<I> (object ? object->unknownCast () : nullptr);
}
//-----------------------------------------------------------------------
/** ICast - casting from FUnknown to another FUnknown Interface */
//-----------------------------------------------------------------------
template<class I>
inline IPtr<I> ICast (FUnknown* object)
{
return FUnknownPtr<I> (object);
}
//------------------------------------------------------------------------
template <class C>
inline C* FCastIsA (const FObject* object)
{
if (object && object->isA (C::getFClassID ()))
return (C*)object;
return nullptr;
}
#ifndef SMTG_HIDE_DEPRECATED_INLINE_FUNCTIONS
//-----------------------------------------------------------------------
/** \deprecated FUCast - casting from FUnknown to Interface */
//-----------------------------------------------------------------------
template <class C>
inline C* FUCast (FObject* object)
SMTG_DEPRECATED_MSG("use ICast<>") inline C* FUCast (FObject* object)
{
return FUnknownPtr<C> (object ? object->unknownCast () : nullptr);
}
template <class C>
inline C* FUCast (FUnknown* object)
SMTG_DEPRECATED_MSG("use ICast<>") inline C* FUCast (FUnknown* object)
{
return FUnknownPtr<C> (object);
}
#endif // SMTG_HIDE_DEPRECATED_FUNCTIONS
//------------------------------------------------------------------------
/** @name Convenience methods that call release or delete respectively

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -607,8 +607,10 @@ TSize FStreamer::readString8 (char8* ptr, TSize size)
if (i > 0 && ptr[i - 1] == '\r')
i--;
}
if (i >= size)
i = size - 1;
ptr[i] = 0;
return i;
}

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -2245,7 +2245,8 @@ bool String::toMultiByte (uint32 destCodePage)
//-----------------------------------------------------------------------------
void String::fromUTF8 (const char8* utf8String)
{
resize (0, false);
if (buffer8 != utf8String)
resize (0, false);
_toWideString (utf8String, static_cast<int32> (strlen (utf8String)), kCP_Utf8);
}

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -299,10 +299,7 @@ tresult PLUGIN_API UpdateHandler::removeDependent (FUnknown* u, IDependent* depe
listIsEmpty = true;
break;
}
else
{
iterList = list.erase (iterList);
}
iterList = list.erase (iterList);
}
else
{

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -178,6 +178,7 @@ private:
FLock* lock; ///< guarded lock
};
} // Thread
} // Base
} // Steinberg
//------------------------------------------------------------------------
} // namespace Thread
} // namespace Base
} // namespace Steinberg

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -140,7 +140,7 @@ bool FLock::trylock ()
#endif
}
} // Thread
} // Base
} // Steinberg
//------------------------------------------------------------------------
} // namespace Thread
} // namespace Base
} // namespace Steinberg

View file

@ -1,6 +1,6 @@
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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

View file

@ -37,4 +37,4 @@ DEF_CLASS_IID (IBStream)
DEF_CLASS_IID (ISizeableStream)
//------------------------------------------------------------------------
} // Steinberg
} // namespace Steinberg

View file

@ -322,8 +322,12 @@
// Deprecation setting
//-----------------------------------------------------------------------------
#ifndef SMTG_DEPRECATED_ATTRIBUTE
#if SMTG_CPP17
#define SMTG_DEPRECATED_ATTRIBUTE(msg) [[deprecated(msg)]]
#else
#define SMTG_DEPRECATED_ATTRIBUTE(msg)
#endif
#endif
#define SMTG_DEPRECATED_MSG(msg) SMTG_DEPRECATED_ATTRIBUTE(msg)
//-----------------------------------------------------------------------------

View file

@ -246,7 +246,7 @@ inline SMTG_CONSTEXPR14 void str8ToStr16 (char16* dst, const char8* src, int32 n
int32 i = 0;
for (;;)
{
if (i == n)
if (i == (n - 1))
{
dst[i] = 0;
return;

View file

@ -117,7 +117,7 @@ namespace Steinberg
typedef int32 UCoord;
static const UCoord kMaxCoord = ((UCoord)0x7FFFFFFF);
static const UCoord kMinCoord = ((UCoord)-0x7FFFFFFF);
} // namespace Steinberg
} // namespace Steinberg
//----------------------------------------------------------------------------

View file

@ -381,4 +381,6 @@ Used<T> toUsed (T* obj) { return Detail::Adopt::toOwnerType<Used> (obj); }
//------------------------------------------------------------------------
} // SKI
#endif
} // Steinberg
//------------------------------------------------------------------------
} // namespace Steinberg

View file

@ -253,7 +253,11 @@ DECLARE_CLASS_IID (ITimerHandler, 0x10BDD94F, 0x41424774, 0x821FAD8F, 0xECA72CA9
- [released: 3.6.8]
On Linux the host has to provide this interface to the plug-in as there's no global event run loop
defined as on other platforms.
defined as on other platforms.
This can be done by IPlugFrame and the context which is passed to the plug-in as an argument
in the method IPlugFactory3::setHostContext. This way the plug-in can get a runloop even if
it does not have an editor.
A plug-in can register an event handler for a file descriptor. The host has to call the event
handler when the file descriptor is marked readable.

View file

@ -48,15 +48,20 @@ namespace PlugType
//------------------------------------------------------------------------
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 kFxBass = "Fx|Bass"; ///< Tools dedicated to Bass Guitar
SMTG_CONSTEXPR const CString kFxChannelStrip = "Fx|Channel Strip"; ///< Tools dedicated to Channel Strip
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 kFxDrums = "Fx|Drums"; ///< Tools dedicated to Drums...
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 kFxGenerator = "Fx|Generator"; ///< Tone Generator, Noise Generator...
SMTG_CONSTEXPR const CString kFxGuitar = "Fx|Guitar"; ///< Tools dedicated to Guitar
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 kFxMastering = "Fx|Mastering"; ///< Dither, Noise Shaping,...
SMTG_CONSTEXPR const CString kFxMicrophone = "Fx|Microphone"; ///< Tools dedicated to Microphone
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...
@ -65,7 +70,7 @@ SMTG_CONSTEXPR const CString kFxReverb = "Fx|Reverb"; ///< Reverberation, Ro
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 kFxVocals = "Fx|Vocals"; ///< Tools dedicated to vocals
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

View file

@ -0,0 +1,221 @@
//------------------------------------------------------------------------
// Project : VST SDK
//
// Category : Interfaces
// Filename : pluginterfaces/vst/ivstdataexchange.h
// Created by : Steinberg, 06/2022
// Description : VST Data Exchange Interface
//
//-----------------------------------------------------------------------------
// 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.
// 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.
//-----------------------------------------------------------------------------
#pragma once
#include "pluginterfaces/base/funknown.h"
//------------------------------------------------------------------------
#include "pluginterfaces/base/falignpush.h"
//------------------------------------------------------------------------
//------------------------------------------------------------------------
namespace Steinberg {
namespace Vst {
//------------------------------------------------------------------------
class IAudioProcessor;
//------------------------------------------------------------------------
typedef uint32 DataExchangeQueueID;
typedef uint32 DataExchangeBlockID;
typedef uint32 DataExchangeUserContextID;
//------------------------------------------------------------------------
static SMTG_CONSTEXPR DataExchangeQueueID InvalidDataExchangeQueueID = kMaxInt32;
static SMTG_CONSTEXPR DataExchangeBlockID InvalidDataExchangeBlockID = kMaxInt32;
//------------------------------------------------------------------------
struct DataExchangeBlock
{
/** pointer to the memory buffer */
void* data;
/** size of the memory buffer */
uint32 size;
/** block identifier */
DataExchangeBlockID blockID;
};
//------------------------------------------------------------------------
/** Host Data Exchange handler interface: Vst::IDataExchangeHandler
\ingroup vstHost vst379
- [host imp]
- [context interface]
- [released: 3.7.9]
- [optional]
The IDataExchangeHandler implements a direct and thread-safe connection from the realtime
audio context of the audio processor to the non-realtime audio context of the edit controller.
This should be used when the edit controller needs continuous data from the audio process for
visualization or other use-cases. To circumvent the bottleneck on the main thread it is possible
to configure the connection in a way that the calls to the edit controller will happen on a
background thread.
Opening a queue:
The main operation for a plug-in is to open a queue via the handler before the plug-in is activated
(but it must be connected to the edit controller via the IConnectionPoint when the plug-in is using
the recommended separation of edit controller and audio processor). The best place to do this is in
the IAudioProcessor::setupProcessing method as this is also the place where the plug-in knows the
sample rate and maximum block size which the plug-in may need to calculate the queue block size.
When a queue is opened the edit controller gets a notification about it and the controller can
decide if it wishes to receive the data on the main thread or the background thread.
Sending data:
In the IAudioProcessor::process call the plug-in can now lock a block from the handler, fill it and
when done free the block via the handler which then sends the block to the edit controller. The edit
controller then receives the block either on the main thread or on a background thread depending on
the setup of the queue.
The host guarantees that all blocks are send before the plug-in is deactivated.
Closing a queue:
The audio processor must close an opened queue and this has to be done after the processor was
deactivated and before it is disconnected from the edit controller (see IConnectionPoint).
What to do when the queue is full and no block can be locked?
The plug-in needs to be prepared for this situation as constraints in the overall system may cause
the queue to get full. If you need to get this information to the controller you can declare a
hidden parameter which you set to a special value and send this parameter change in your audio
process method.
*/
class IDataExchangeHandler : public FUnknown
{
public:
/** open a new queue
*
* only allowed to be called from the main thread when the component is not active but
* initialized and connected (see IConnectionPoint)
*
* @param processor the processor who wants to open the queue
* @param blockSize size of one block
* @param numBlocks number of blocks in the queue
* @param alignment data alignment, if zero will use the platform default alignment if any
* @param userContextID an identifier internal to the processor
* @param outID on return the ID of the queue
* @return kResultTrue on success
*/
virtual tresult PLUGIN_API openQueue (IAudioProcessor* processor, uint32 blockSize,
uint32 numBlocks, uint32 alignment,
DataExchangeUserContextID userContextID,
DataExchangeQueueID* outID) = 0;
/** close a queue
*
* closes and frees all memory of a previously opened queue
* if there are locked blocks in the queue, they are freed and made invalid
*
* only allowed to be called from the main thread when the component is not active but
* initialized and connected
*
* @param queueID the ID of the queue to close
* @return kResultTrue on success
*/
virtual tresult PLUGIN_API closeQueue (DataExchangeQueueID queueID) = 0;
/** lock a block if available
*
* only allowed to be called from within the IAudioProcessor::process call
*
* @param queueID the ID of the queue
* @param block on return will contain the data pointer and size of the block
* @return kResultTrue if a free block was found and kOutOfMemory if all blocks are locked
*/
virtual tresult PLUGIN_API lockBlock (DataExchangeQueueID queueId,
DataExchangeBlock* block) = 0;
/** free a previously locked block
*
* only allowed to be called from within the IAudioProcessor::process call
*
* @param queueID the ID of the queue
* @param blockID the ID of the block
* @param sendToController if true the block data will be send to the IEditController otherwise
* it will be discarded
* @return kResultTrue on success
*/
virtual tresult PLUGIN_API freeBlock (DataExchangeQueueID queueId, DataExchangeBlockID blockID,
TBool sendToController) = 0;
//------------------------------------------------------------------------
static const FUID iid;
};
DECLARE_CLASS_IID (IDataExchangeHandler, 0x36D551BD, 0x6FF54F08, 0xB48E830D, 0x8BD5A03B)
//------------------------------------------------------------------------
/** Data Exchange Receiver interface: Vst::IDataExchangeReceiver
\ingroup vstPlug vst379
- [plug imp]
- [released: 3.7.9
- [optional]
The receiver interface is required to receive data from the realtime audio process via the
IDataExchangeHandler.
\see \ref IDataExchangeHandler
*/
class IDataExchangeReceiver : public FUnknown
{
public:
/** queue opened notification
*
* called on the main thread when the processor has opened a queue
*
* @param userContextID the user context ID of the queue
* @param blockSize the size of one block of the queue
* @param dispatchedOnBackgroundThread if true on output the blocks are dispatched on a
* background thread [defaults to false in which case the
* blocks are dispatched on the main thread]
*/
virtual void PLUGIN_API queueOpened (DataExchangeUserContextID userContextID, uint32 blockSize,
TBool& dispatchOnBackgroundThread) = 0;
/** queue closed notification
*
* called on the main thread when the processor has closed a queue
*
* @param userContextID the user context ID of the queue
*/
virtual void PLUGIN_API queueClosed (DataExchangeUserContextID userContextID) = 0;
/** one or more blocks were received
*
* called either on the main thread or a background thread depending on the
* dispatchOnBackgroundThread value in the queueOpened call.
*
* the data of the blocks are only valid inside this call and the blocks only become available
* to the queue afterwards.
*
* @param userContextID the user context ID of the queue
* @param numBlocks number of blocks
* @param blocks the blocks
* @param onBackgroundThread true if the call is done on a background thread
*/
virtual void PLUGIN_API onDataExchangeBlocksReceived (DataExchangeUserContextID userContextID,
uint32 numBlocks,
DataExchangeBlock* blocks,
TBool onBackgroundThread) = 0;
//------------------------------------------------------------------------
static const FUID iid;
};
DECLARE_CLASS_IID (IDataExchangeReceiver, 0x45A759DC, 0x84FA4907, 0xABCB6175, 0x2FC786B6)
//------------------------------------------------------------------------
} // namespace Vst
} // namespace Steinberg
//------------------------------------------------------------------------
#include "pluginterfaces/base/falignpop.h"
//------------------------------------------------------------------------

View file

@ -86,7 +86,7 @@ const CString kEditor = "editor";
enum RestartFlags
{
/** The Component should be reloaded
* The host has to unload completely the plug-in (controller/processor) and reload it.
* The host has to unload completely the plug-in (controller/processor) and reload it.
* [SDK 3.0.0] */
kReloadComponent = 1 << 0,
@ -105,7 +105,7 @@ enum RestartFlags
/** Latency has changed
* The plug informs the host that its latency has changed, getLatencySamples should return the new latency after setActive (true) was called
* The host has to deactivate and reactivate the plug-in, then afterwards the host could ask for the current latency (getLatencySamples)
* see IAudioProcessor::getLatencySamples
* See IAudioProcessor::getLatencySamples
* [SDK 3.0.0] */
kLatencyChanged = 1 << 3,
@ -121,39 +121,53 @@ enum RestartFlags
* and reread program changes parameters (stepCount and associated unitID)
* [SDK 3.0.1] */
kMidiCCAssignmentChanged = 1 << 5,
/** Note Expression has changed (info, count, PhysicalUIMapping, ...)
* Either the note expression type info, the count of note expressions or the physical UI mapping has changed.
* The host invalidates all caches of note expression infos and asks the edit controller for the current ones.
* See INoteExpressionController, NoteExpressionTypeInfo and INoteExpressionPhysicalUIMapping
* [SDK 3.5.0] */
kNoteExpressionChanged = 1 << 6,
/** Input / Output bus titles have changed
* The host invalidates all caches of bus titles and asks the edit controller for the current titles.
* [SDK 3.5.0] */
kIoTitlesChanged = 1 << 7,
/** Prefetch support has changed
* The plug-in informs the host that its PrefetchSupport has changed
* The host has to deactivate the plug-in, calls IPrefetchableSupport::getPrefetchableSupport and reactivate the plug-in
* see IPrefetchableSupport
* The host has to deactivate the plug-in, calls IPrefetchableSupport::getPrefetchableSupport
* and reactivate the plug-in.
* See IPrefetchableSupport
* [SDK 3.6.1] */
kPrefetchableSupportChanged = 1 << 8,
kPrefetchableSupportChanged = 1 << 8,
/** RoutingInfo has changed
* The plug-in informs the host that its internal routing (relation of an event-input-channel to an audio-output-bus) has changed
* The host ask the plug-in for the new routing with IComponent::getRoutingInfo, \ref vst3Routing
* see IComponent
* The plug-in informs the host that its internal routing (relation of an event-input-channel to
* an audio-output-bus) has changed. The host asks the plug-in for the new routing with
* IComponent::getRoutingInfo, \ref vst3Routing
* See IComponent
* [SDK 3.6.6] */
kRoutingInfoChanged = 1 << 9,
/** Key switches has changed (info, count)
* Either the Key switches info, the count of Key switches has changed.
* The host invalidates all caches of Key switches infos and asks the edit controller (IKeyswitchController) for the current ones.
* The host invalidates all caches of Key switches infos and asks the edit controller
* (IKeyswitchController) for the current ones.
* See IKeyswitchController
* [SDK 3.7.3] */
kKeyswitchChanged = 1 << 10
kKeyswitchChanged = 1 << 10,
/** Mapping of ParamID has changed
* The Plug-in informs the host that its parameters ID has changed. This has to be called by the
* edit controller in the method setComponentState or setState (during projects loading) when the
* plug-in detects that the given state was associated to an older version of the plug-in, or to a
* plug-in to replace (for ex. migrating VST2 => VST3), with a different set of parameter IDs, then
* the host could remap any used parameters like automation by asking the IRemapParamID interface
* (which extends IEditController).
* See IRemapParamID
* [SDK 3.7.11] */
kParamIDMappingChanged = 1 << 11
};
//------------------------------------------------------------------------
@ -613,6 +627,27 @@ public:
DECLARE_CLASS_IID (IEditControllerHostEditing, 0xC1271208, 0x70594098, 0xB9DD34B3, 0x6BB0195E)
//------------------------------------------------------------------------
/** Extended plug-in interface IComponentHandler for an edit controller
\ingroup vstIHost vst379
- [host imp]
- [extends IComponentHandler]
- [released: 3.7.9]
- [optional]
*/
//------------------------------------------------------------------------
class IComponentHandlerSystemTime : public FUnknown
{
public:
//------------------------------------------------------------------------
/** get the current systemTime (the same as the one used in ProcessContext::systemTime). */
virtual tresult PLUGIN_API getSystemTime (int64& systemTime) = 0;
//------------------------------------------------------------------------
static const FUID iid;
};
DECLARE_CLASS_IID (IComponentHandlerSystemTime, 0xF9E53056, 0xD1554CD5, 0xB7695E1B, 0x7B0F7745)
//------------------------------------------------------------------------
} // namespace Vst
} // namespace Steinberg

View file

@ -0,0 +1,75 @@
//------------------------------------------------------------------------
// Project : VST SDK
//
// Category : Interfaces
// Filename : pluginterfaces/vst/ivstremapparamid.h
// Created by : Steinberg, 02/2024
// Description : VST Edit Controller Interfaces
//
//-----------------------------------------------------------------------------
// 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.
// 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.
//-----------------------------------------------------------------------------
#pragma once
#include "pluginterfaces/base/funknown.h"
#include "pluginterfaces/vst/vsttypes.h"
//------------------------------------------------------------------------
#include "pluginterfaces/base/falignpush.h"
//------------------------------------------------------------------------
//------------------------------------------------------------------------
namespace Steinberg {
namespace Vst {
//------------------------------------------------------------------------
/** Extended IEditController interface for a component.
\ingroup vstIPlug vst3711
- [plug imp]
- [extends IEditController]
- [released: 3.7.11]
- [optional]
When replacing one plug-in with another, the host can ask the new plug-in for remapping paramIDs to
new ones.
\n
\see Moduleinfo
\see \ref IPluginCompatibility
\see IEditController
*/
class IRemapParamID : public FUnknown
{
public:
//------------------------------------------------------------------------
/** Retrieve the appropriate paramID for a specific plug-in UID and paramID (or index for VST 2
* plug-ins).
* The retrieved paramID should match the one it replaces, maintaining the same
* behavior during automation playback. Called in UI-Thread context.
* @param[in] pluginToReplaceUID - TUID of plug-in (processor) that will be replaced
* @param[in] oldParamID - paramID (or index for VST 2 plug-ins) to be replaced
* @param[out] newParamID - contains the associated paramID to be used
* Return kResultTrue means that a compatible parameter is available
* Return kResultFalse means that NO compatible parameter is available
*/
virtual tresult PLUGIN_API getCompatibleParamID (const TUID pluginToReplaceUID /*in*/,
ParamID oldParamID /*in*/,
ParamID& newParamID /*out*/) = 0;
//------------------------------------------------------------------------
static const FUID iid;
};
DECLARE_CLASS_IID (IRemapParamID, 0x2B88021E, 0x6286B646, 0xB49DF76A, 0x5663061C)
//------------------------------------------------------------------------
} // namespace Vst
} // namespace Steinberg
//------------------------------------------------------------------------
#include "pluginterfaces/base/falignpop.h"
//------------------------------------------------------------------------

View file

@ -103,6 +103,9 @@ const Speaker kSpeakerBsr = (Speaker)1 << 34; ///< Bottom Side Right (Bsr)
const Speaker kSpeakerBrl = (Speaker)1 << 35; ///< Bottom Rear Left (Brl)
const Speaker kSpeakerBrc = (Speaker)1 << 36; ///< Bottom Rear Center (Brc)
const Speaker kSpeakerBrr = (Speaker)1 << 37; ///< Bottom Rear Right (Brr)
const Speaker kSpeakerLw = (Speaker)1 << 59; ///< Left Wide (Lw)
const Speaker kSpeakerRw = (Speaker)1 << 60; ///< Right Wide (Rw)
//------------------------------------------------------------------------
/** @}*/
@ -118,6 +121,7 @@ namespace SpeakerArr
const SpeakerArrangement kEmpty = 0; ///< empty arrangement
const SpeakerArrangement kMono = kSpeakerM; ///< M
const SpeakerArrangement kStereo = kSpeakerL | kSpeakerR; ///< L R
const SpeakerArrangement kStereoWide = kSpeakerLw | kSpeakerRw; ///< Lw Rw
const SpeakerArrangement kStereoSurround = kSpeakerLs | kSpeakerRs; ///< Ls Rs
const SpeakerArrangement kStereoCenter = kSpeakerLc | kSpeakerRc; ///< Lc Rc
const SpeakerArrangement kStereoSide = kSpeakerSl | kSpeakerSr; ///< Sl Sr
@ -306,6 +310,22 @@ const SpeakerArrangement k90_6 = kSpeakerL | kSpeakerR | kSpeakerC |
/** L R C Lfe Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr Tsl Tsr */ // 9.1.6
const SpeakerArrangement k91_6 = k90_6 | kSpeakerLfe;
/** L R C Ls Rs Sl Sr Tfl Tfr Trl Trr Lw Rw */ // 9.0.4 (Dolby)
const SpeakerArrangement k90_4_W = kSpeakerL | kSpeakerR | kSpeakerC |
kSpeakerLs | kSpeakerRs | kSpeakerLw | kSpeakerRw | kSpeakerSl | kSpeakerSr |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
/** L R C Lfe Ls Rs Sl Sr Tfl Tfr Trl Trr Lw Rw */ // 9.1.4 (Dolby)
const SpeakerArrangement k91_4_W = k90_4_W | kSpeakerLfe;
/** L R C Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr Lw Rw */ // 9.0.6 (Dolby)
const SpeakerArrangement k90_6_W = kSpeakerL | kSpeakerR | kSpeakerC |
kSpeakerLs | kSpeakerRs | kSpeakerLw | kSpeakerRw | kSpeakerSl | kSpeakerSr |
kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr;
/** L R C Lfe Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr Lw Rw */ // 9.1.6 (Dolby)
const SpeakerArrangement k91_6_W = k90_6_W | kSpeakerLfe;
/** 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;
@ -424,6 +444,7 @@ const SpeakerArrangement k50_4_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerL
const CString kStringEmpty = "";
const CString kStringMono = "Mono";
const CString kStringStereo = "Stereo";
const CString kStringStereoWide = "Stereo (Lw Rw)";
const CString kStringStereoR = "Stereo (Ls Rs)";
const CString kStringStereoC = "Stereo (Lc Rc)";
const CString kStringStereoSide = "Stereo (Sl Sr)";
@ -487,10 +508,14 @@ const CString kString70_4 = "7.0.4";
const CString kString71_4 = "7.1.4";
const CString kString70_6 = "7.0.6";
const CString kString71_6 = "7.1.6";
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 kString90_4 = "9.0.4 ITU";
const CString kString91_4 = "9.1.4 ITU";
const CString kString90_6 = "9.0.6 ITU";
const CString kString91_6 = "9.1.6 ITU";
const CString kString90_4_W = "9.0.4";
const CString kString91_4_W = "9.1.4";
const CString kString90_6_W = "9.0.6";
const CString kString91_6_W = "9.1.6";
const CString kString50_5 = "10.0 Auro-3D";
const CString kString51_5 = "10.1 Auro-3D";
const CString kString50_6 = "11.0 Auro-3D";
@ -514,13 +539,13 @@ 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";
const CString kStringAmbi1stOrder = "1OA";
const CString kStringAmbi2cdOrder = "2OA";
const CString kStringAmbi3rdOrder = "3OA";
const CString kStringAmbi4thOrder = "4OA";
const CString kStringAmbi5thOrder = "5OA";
const CString kStringAmbi6thOrder = "6OA";
const CString kStringAmbi7thOrder = "7OA";
/*@}*/
//------------------------------------------------------------------------
@ -529,6 +554,7 @@ const CString kStringAmbi7thOrder = "7th Order Ambisonics";
/*@{*/
const CString kStringMonoS = "M";
const CString kStringStereoS = "L R";
const CString kStringStereoWideS = "Lw Rw";
const CString kStringStereoRS = "Ls Rs";
const CString kStringStereoCS = "Lc Rc";
const CString kStringStereoSS = "Sl Sr";
@ -589,6 +615,10 @@ 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 kString90_4_WS = "L R C Ls Rs Sl Sr Tfl Tfr Trl Trr Lw Rw";
const CString kString91_4_WS = "L R C LFE Ls Rs Sl Sr Tfl Tfr Trl Trr Lw Rw";
const CString kString90_6_WS = "L R C Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr Lw Rw";
const CString kString91_6_WS = "L R C LFE Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr Lw Rw";
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";
@ -730,7 +760,8 @@ inline bool hasMiddleSpeakers (const SpeakerArrangement& arr)
if (arr & kSpeakerL || arr & kSpeakerR || arr & kSpeakerC || arr & kSpeakerLs ||
arr & kSpeakerRs || arr & kSpeakerLc || arr & kSpeakerRc || arr & kSpeakerCs ||
arr & kSpeakerSl || arr & kSpeakerSr || arr & kSpeakerM || arr & kSpeakerPl ||
arr & kSpeakerPr || arr & kSpeakerLcs || arr & kSpeakerRcs)
arr & kSpeakerPr || arr & kSpeakerLcs || arr & kSpeakerRcs || arr & kSpeakerLw ||
arr & kSpeakerRw)
return true;
return false;
}
@ -802,6 +833,8 @@ inline SpeakerArrangement getSpeakerArrangementFromString (CString arrStr)
return kStereo;
if (!strcmp8 (arrStr, kStringStereoR))
return kStereoSurround;
if (!strcmp8 (arrStr, kStringStereoWide))
return kStereoWide;
if (!strcmp8 (arrStr, kStringStereoC))
return kStereoCenter;
if (!strcmp8 (arrStr, kStringStereoSide))
@ -926,6 +959,14 @@ inline SpeakerArrangement getSpeakerArrangementFromString (CString arrStr)
return k90_6;
if (!strcmp8 (arrStr, kString91_6))
return k91_6;
if (!strcmp8 (arrStr, kString90_4_W))
return k90_4_W;
if (!strcmp8 (arrStr, kString91_4_W))
return k91_4_W;
if (!strcmp8 (arrStr, kString90_6_W))
return k90_6_W;
if (!strcmp8 (arrStr, kString91_6_W))
return k91_6_W;
if (!strcmp8 (arrStr, kString50_5))
return k50_5;
if (!strcmp8 (arrStr, kString51_5))
@ -998,6 +1039,7 @@ inline CString getSpeakerArrangementString (SpeakerArrangement arr, bool withSpe
//--- Stereo pairs---
case kStereo: return withSpeakersName ? kStringStereoS : kStringStereo;
case kStereoSurround: return withSpeakersName ? kStringStereoRS : kStringStereoR;
case kStereoWide: return withSpeakersName ? kStringStereoWideS : kStringStereoWide;
case kStereoCenter: return withSpeakersName ? kStringStereoCS : kStringStereoC;
case kStereoSide: return withSpeakersName ? kStringStereoSS : kStringStereoSide;
case kStereoCLfe: return withSpeakersName ? kStringStereoCLfeS: kStringStereoCLfe;
@ -1066,6 +1108,10 @@ inline CString getSpeakerArrangementString (SpeakerArrangement arr, bool withSpe
case k91_4: return withSpeakersName ? kString91_4S : kString91_4;
case k90_6: return withSpeakersName ? kString90_6S : kString90_6;
case k91_6: return withSpeakersName ? kString91_6S : kString91_6;
case k90_4_W: return withSpeakersName ? kString90_4_WS : kString90_4_W;
case k91_4_W: return withSpeakersName ? kString91_4_WS : kString91_4_W;
case k90_6_W: return withSpeakersName ? kString90_6_WS : kString90_6_W;
case k91_6_W: return withSpeakersName ? kString91_6_WS : kString91_6_W;
case k130: return withSpeakersName ? kString130S : kString130;
case k131: return withSpeakersName ? kString131S : kString131;
@ -1257,6 +1303,10 @@ inline CString getSpeakerShortName (const SpeakerArrangement& arr, int32 index)
if (speaker == kSpeakerBrr)
return "Brr";
if (speaker == kSpeakerLw)
return "Lw";
if (speaker == kSpeakerRw)
return "Rw";
return "";
}

View file

@ -24,17 +24,20 @@ namespace Vst {
//------------------------------------------------------------------------
/** VST 3 SDK Version */
#ifndef kVstVersionString
#define kVstVersionString "VST 3.7.8" ///< SDK version for PClassInfo2
#define kVstVersionString "VST 3.7.11" ///< SDK version for PClassInfo2
#endif
#define kVstVersionMajor 3
#define kVstVersionMinor 7
#define kVstVersionSub 8
#define kVstVersionSub 11
#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_11_VERSION 0x03070B
#define VST_3_7_10_VERSION 0x03070A
#define VST_3_7_9_VERSION 0x030709
#define VST_3_7_8_VERSION 0x030708
#define VST_3_7_7_VERSION 0x030707
#define VST_3_7_6_VERSION 0x030706
@ -77,8 +80,11 @@ typedef int32 BusDirection; ///< bus direction (in/out)
typedef int32 BusType; ///< bus type (main/aux)
typedef int32 IoMode; ///< I/O mode (see \ref vst3IoMode)
typedef int32 UnitID; ///< unit identifier
typedef double ParamValue; ///< parameter value type
typedef uint32 ParamID; ///< parameter identifier
typedef double ParamValue; ///< parameter value type: normalized value => [0.0, 1.0]
typedef uint32 ParamID; ///< parameter identifier: value in range [0, 0x7FFFFFFF].
/// The range [0x80000000, 0xFFFFFFFF], is reserved for host application.
typedef int32 ProgramListID; ///< program list identifier
typedef int16 CtrlNumber; ///< MIDI controller number (see \ref ControllerNumbers for allowed values)
@ -88,8 +94,9 @@ typedef int64 TSamples; ///< time expressed in audio samples
typedef uint32 ColorSpec; ///< color defining by 4 component ARGB value (Alpha/Red/Green/Blue)
//------------------------------------------------------------------------
static const ParamID kNoParamId = 0xffffffff; ///< default for uninitialized parameter ID
// static const ParamID kNoParamId = std::numeric_limits<ParamID>::max ();
static const ParamID kNoParamId = 0xFFFFFFFF; ///< default for uninitialized parameter ID
static const ParamID kMinParamId = 0; ///< value min for a parameter ID
static const ParamID kMaxParamId = 0x7FFFFFFF; ///< value max for a parameter ID
//------------------------------------------------------------------------
// Audio Types
@ -117,6 +124,10 @@ static SMTG_CONSTEXPR const uint32 SDKVersion =
// Versions History which allows to write such code:
// if constexpr (SDKVersion >= SDKVersion_3_6_5) { ... }
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_11 = VST_3_7_11_VERSION;
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_10 = VST_3_7_10_VERSION;
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_9 = VST_3_7_9_VERSION;
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_8 = VST_3_7_8_VERSION;
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_7 = VST_3_7_7_VERSION;
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_6 = VST_3_7_6_VERSION;
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_5 = VST_3_7_5_VERSION;

View file

@ -1,6 +1,6 @@
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -7,7 +7,6 @@ Here are located:
- **AAX** Wrapper
- **AU** Wrapper
- **AUv3** Wrapper
- **VST 2** Wrapper
- InterAppAudio
## License & Usage guidelines

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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,16 +35,14 @@
// OF THE POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
#include "base/source/fcommandline.h"
#include "pluginterfaces/base/fplatform.h"
#include "pluginterfaces/base/iplugincompatibility.h"
#include "pluginterfaces/vst/vsttypes.h"
#include "public.sdk/source/common/memorystream.h"
#include "public.sdk/source/common/readfile.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 "base/source/fcommandline.h"
#include "pluginterfaces/base/fplatform.h"
#include "pluginterfaces/vst/vsttypes.h"
#include <cstdio>
#include <fstream>
#include <iostream>
@ -98,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,
@ -142,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;
@ -358,7 +324,7 @@ int run (int argc, char* argv[])
auto outputFile = valueMap[optOutputPath];
#endif
auto ostream = new std::ofstream (outputFile);
if (ostream->is_open ())
outputStream = ostream;
else
@ -388,10 +354,6 @@ int run (int argc, char* argv[])
//------------------------------------------------------------------------
#if SMTG_OS_WINDOWS
//------------------------------------------------------------------------
#include <Windows.h>
#include <vector>
//------------------------------------------------------------------------
using Utf8String = std::string;
@ -402,7 +364,7 @@ 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]);
auto str = reinterpret_cast<const Steinberg::Vst::TChar*> (wargv[i]);
utf8Args.push_back (VST3::StringConvert::convert (str));
}
@ -431,9 +393,14 @@ int wmain (int argc, wchar_t* wargv[])
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
//------------------------------------------------------------------------
#endif // SMTG_OS_WINDOWS

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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,6 @@ CPluginView::CPluginView (const ViewRect* _rect)
//------------------------------------------------------------------------
CPluginView::~CPluginView ()
{
// NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
setFrame (nullptr);
}

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -112,4 +112,5 @@ protected:
IPtr<IPlugFrame> plugFrame;
};
} // namespace
//------------------------------------------------------------------------
} // namespace Steinberg

View file

@ -36,8 +36,13 @@
//-----------------------------------------------------------------------------
#include "readfile.h"
#include "public.sdk/source/vst/utility/stringconvert.h"
#include "pluginterfaces/base/fplatform.h"
#if SMTG_OS_WINDOWS
#include "public.sdk/source/vst/utility/stringconvert.h"
#endif
#include <fstream>
#include <sstream>

View file

@ -51,5 +51,4 @@ Returns entire file content at the given path
std::string readFile (const std::string& path);
//------------------------------------------------------------------------
} // namespace Steinberg

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -180,7 +180,12 @@ public:
{
std::string wd (workDir);
wd += "/";
return loadInternal (wd + path, errorDescription);
if (loadInternal (wd + path, errorDescription))
{
name = path;
return true;
}
return false;
}
}
return loadInternal (path, errorDescription);

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -9,7 +9,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -92,7 +92,7 @@ struct Optional
T&& value () noexcept
{
checkValid ();
return move (_value);
return std::move (_value);
}
const T& value () const noexcept

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -130,7 +130,7 @@ inline const Steinberg::Vst::TChar* toTChar (const std::u16string& str)
//------------------------------------------------------------------------
/**
* convert an number to an UTF-16 string
* convert a number to an UTF-16 string
*
* @param value number
*

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -172,10 +172,7 @@ inline UID& UID::operator= (const UID& uid) noexcept
//------------------------------------------------------------------------
inline UID& UID::operator= (const TUID& uid) noexcept
{
uint64_t* p1 = reinterpret_cast<uint64_t*> (_data);
const uint64_t* p2 = reinterpret_cast<const uint64_t*> (uid);
p1[0] = p2[0];
p1[1] = p2[1];
memcpy (_data, reinterpret_cast<const void*>(uid), 16);
return *this;
}
@ -281,12 +278,7 @@ inline Optional<UID> UID::fromString (const StringT& str, bool comFormat) noexce
inline UID UID::fromTUID (const TUID _uid) noexcept
{
UID result;
uint64_t* p1 = reinterpret_cast<uint64_t*> (result._data);
const uint64_t* p2 = reinterpret_cast<const uint64_t*> (_uid);
p1[0] = p2[0];
p1[1] = p2[1];
memcpy (result._data, reinterpret_cast<const void*>(_uid), 16);
return result;
}

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -41,6 +41,7 @@
#include "pluginterfaces/vst/ivstautomationstate.h"
#include "pluginterfaces/vst/ivstchannelcontextinfo.h"
#include "pluginterfaces/vst/ivstcontextmenu.h"
#include "pluginterfaces/vst/ivstdataexchange.h"
#include "pluginterfaces/vst/ivsteditcontroller.h"
#include "pluginterfaces/vst/ivstevents.h"
#include "pluginterfaces/vst/ivsthostapplication.h"
@ -53,6 +54,7 @@
#include "pluginterfaces/vst/ivstpluginterfacesupport.h"
#include "pluginterfaces/vst/ivstplugview.h"
#include "pluginterfaces/vst/ivstprefetchablesupport.h"
#include "pluginterfaces/vst/ivstremapparamid.h"
#include "pluginterfaces/vst/ivstrepresentation.h"
#include "pluginterfaces/vst/ivsttestplugprovider.h"
#include "pluginterfaces/vst/ivstunits.h"
@ -138,8 +140,15 @@ DEF_CLASS_IID (Vst::IProcessContextRequirements)
DEF_CLASS_IID (Vst::IProgress)
DEF_CLASS_IID (Vst::ITestPlugProvider2)
//----VST 3.7.5---------------------------------
DEF_CLASS_IID (IPluginCompatibility)
//----VST 3.7.9---------------------------------
DEF_CLASS_IID (Vst::IComponentHandlerSystemTime)
DEF_CLASS_IID (Vst::IDataExchangeHandler)
DEF_CLASS_IID (Vst::IDataExchangeReceiver)
//----VST 3.7.11---------------------------------
DEF_CLASS_IID (Vst::IRemapParamID)
} // Steinberg

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:
@ -228,6 +228,8 @@ ParamValue RangeParameter::toNormalized (ParamValue plainValue) const
{
if (info.stepCount > 1)
return ToNormalized <ParamValue>(plainValue - getMin (), info.stepCount);
SMTG_ASSERT (getMax () - getMin () != 0);
return (plainValue - getMin ()) / (getMax () - getMin ());
}

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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,7 +98,7 @@ public:
OBJ_METHODS (Parameter, FObject)
//------------------------------------------------------------------------
protected:
ParameterInfo info {0};
ParameterInfo info {};
ParamValue valueNormalized {0.};
int32 precision {4};
};

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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:

View file

@ -8,7 +8,7 @@
//
//-----------------------------------------------------------------------------
// LICENSE
// (c) 2023, Steinberg Media Technologies GmbH, All Rights Reserved
// (c) 2024, 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: