| @@ -100,6 +100,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-copy-dtor", | |||
| #include <public.sdk/source/common/memorystream.h> | |||
| #include <public.sdk/source/vst/vsteditcontroller.h> | |||
| #include <public.sdk/source/vst/vstpresetfile.h> | |||
| #include "pslextensions/ipslviewembedding.h" | |||
| #else | |||
| // needed for VST_VERSION | |||
| #include <pluginterfaces/vst/vsttypes.h> | |||
| @@ -150,6 +152,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-copy-dtor", | |||
| #include <public.sdk/source/vst/hosting/pluginterfacesupport.cpp> | |||
| #endif | |||
| #include "pslextensions/ipslviewembedding.h" | |||
| //============================================================================== | |||
| namespace Steinberg | |||
| { | |||
| @@ -172,6 +176,12 @@ namespace Steinberg | |||
| DEF_CLASS_IID (Linux::IEventHandler) | |||
| #endif | |||
| } | |||
| namespace Presonus | |||
| { | |||
| DEF_CLASS_IID (IPlugInViewEmbedding) | |||
| } | |||
| #endif // JUCE_VST3HEADERS_INCLUDE_HEADERS_ONLY | |||
| JUCE_END_IGNORE_WARNINGS_MSVC | |||
| @@ -0,0 +1,190 @@ | |||
| //************************************************************************************************ | |||
| // | |||
| // PreSonus Plug-In Extensions | |||
| // Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | |||
| // | |||
| // Filename : ipslcontextinfo.h | |||
| // Created by : PreSonus Software Ltd., 08/2013, last updated 11/2016 | |||
| // Description : Context Information Interface | |||
| // | |||
| //************************************************************************************************ | |||
| /* | |||
| DISCLAIMER: | |||
| The PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | |||
| provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | |||
| PreSonus is not affiliated with the owner of the underlying technology in any way. | |||
| */ | |||
| //************************************************************************************************ | |||
| #ifndef _ipslcontextinfo_h | |||
| #define _ipslcontextinfo_h | |||
| #include "pluginterfaces/vst/vsttypes.h" | |||
| #include "pluginterfaces/base/falignpush.h" | |||
| namespace Presonus { | |||
| //************************************************************************************************ | |||
| // IContextInfoProvider | |||
| /** Callback interface to access context information from the host. Implemented by the host | |||
| as extension of Steinberg::Vst::IComponentHandler. | |||
| The host might not be able to report all available attributes at all times. Please check the | |||
| return value of getContextInfoValue() and getContextInfoString(). It's not required to implement | |||
| IContextInfoHandler on the plug-in side, but we recommend to do so. The host will then call | |||
| notifyContextInfoChange() during initialization to inform the plug-in about the initial state of | |||
| the available attributes. | |||
| Usage Example: | |||
| IComponentHandler* handler; | |||
| FUnknownPtr<IContextInfoProvider> contextInfoProvider (handler); | |||
| void PLUGIN_API MyEditController::notifyContextInfoChange () | |||
| { | |||
| int32 channelIndex = 0; | |||
| contextInfoProvider->getContextInfoValue (channelIndex, ContextInfo::kIndex); | |||
| TChar channelName[128] = {0}; | |||
| contextInfoProvider->getContextInfoString (channelName, 128, ContextInfo::kName); | |||
| } | |||
| */ | |||
| //************************************************************************************************ | |||
| struct IContextInfoProvider: Steinberg::FUnknown | |||
| { | |||
| /** Get context information by identifier. */ | |||
| virtual Steinberg::tresult PLUGIN_API getContextInfoValue (Steinberg::int32& value, Steinberg::FIDString id) = 0; | |||
| /** Get context information by identifier. */ | |||
| virtual Steinberg::tresult PLUGIN_API getContextInfoString (Steinberg::Vst::TChar* string, Steinberg::int32 maxCharCount, Steinberg::FIDString id) = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (IContextInfoProvider, 0x483e61ea, 0x17994494, 0x8199a35a, 0xebb35e3c) | |||
| //************************************************************************************************ | |||
| // IContextInfoProvider2 | |||
| /** Extension to IContextInfoProvider enabling the plug-in to modify host context information. | |||
| Values like volume or pan support both, numeric and string representation for get and set.*/ | |||
| //************************************************************************************************ | |||
| struct IContextInfoProvider2: IContextInfoProvider | |||
| { | |||
| using IContextInfoProvider::getContextInfoValue; | |||
| /** Get context information by identifier (floating-point). */ | |||
| virtual Steinberg::tresult PLUGIN_API getContextInfoValue (double& value, Steinberg::FIDString id) = 0; | |||
| /** Set context information by identifier (floating-point). */ | |||
| virtual Steinberg::tresult PLUGIN_API setContextInfoValue (Steinberg::FIDString id, double value) = 0; | |||
| /** Set context information by identifier (integer). */ | |||
| virtual Steinberg::tresult PLUGIN_API setContextInfoValue (Steinberg::FIDString id, Steinberg::int32 value) = 0; | |||
| /** Set context information by identifier (string). */ | |||
| virtual Steinberg::tresult PLUGIN_API setContextInfoString (Steinberg::FIDString id, Steinberg::Vst::TChar* string) = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (IContextInfoProvider2, 0x61e45968, 0x3d364f39, 0xb15e1733, 0x4944172b) | |||
| //************************************************************************************************ | |||
| // IContextInfoHandler | |||
| /** Notification interface for context information changes. Implemented by the plug-in as extension of | |||
| Steinberg::Vst::IEditController. */ | |||
| //************************************************************************************************ | |||
| struct IContextInfoHandler: Steinberg::FUnknown | |||
| { | |||
| /** Called by the host if context information has changed. */ | |||
| virtual void PLUGIN_API notifyContextInfoChange () = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (IContextInfoHandler, 0xc3b17bc0, 0x2c174494, 0x80293402, 0xfbc4bbf8) | |||
| //************************************************************************************************ | |||
| // IContextInfoHandler2 | |||
| /** Replacement of IContextInfoHandler passing additional information about what changed on the host-side. | |||
| This interface will be preferred if implemented by the plug-in. It is required to | |||
| receive certain notifications like volume, pan, etc. */ | |||
| //************************************************************************************************ | |||
| struct IContextInfoHandler2: Steinberg::FUnknown | |||
| { | |||
| /** Called by the host if context information has changed. | |||
| The identifier (id) is empty for the inital update. */ | |||
| virtual void PLUGIN_API notifyContextInfoChange (Steinberg::FIDString id) = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (IContextInfoHandler2, 0x31e29a7a, 0xe55043ad, 0x8b95b9b8, 0xda1fbe1e) | |||
| //************************************************************************************************ | |||
| // Context Information Attributes | |||
| //************************************************************************************************ | |||
| namespace ContextInfo | |||
| { | |||
| /** Channel types. */ | |||
| enum ChannelType | |||
| { | |||
| kTrack = 0, ///< audio track | |||
| kBus, ///< audio bus | |||
| kFX, ///< FX channel | |||
| kSynth, ///< output of virtual instrument | |||
| kIn, ///< input from audio driver | |||
| kOut ///< output to audio driver (main or sub-out) | |||
| }; | |||
| /** Channel index mode. */ | |||
| enum ChannelIndexMode | |||
| { | |||
| kFlatIndex = 0, ///< channel indices are contiguous (example: track 1, track 2, bus 3, bus 4) | |||
| kPerTypeIndex ///< channel indices restarts at zero for each type (example: track 1, track 2, bus 1, bus 2) | |||
| }; | |||
| // per instance | |||
| const Steinberg::FIDString kID = "id"; ///< (R) channel identifier, use to compare identity (string) | |||
| const Steinberg::FIDString kName = "name"; ///< (R/W) channel name, can be displayed to the user (string) | |||
| const Steinberg::FIDString kType = "type"; ///< (R) channel type (int32, see ChannelType enumeration) | |||
| const Steinberg::FIDString kMain = "main"; ///< (R) channel is main output (int32, 0: false, 1: true) | |||
| const Steinberg::FIDString kIndex = "index"; ///< (R) channel index (int32, starts at zero) | |||
| const Steinberg::FIDString kColor = "color"; ///< (R/W) channel color (int32: RGBA) | |||
| const Steinberg::FIDString kVisibility = "visibility"; ///< (R) channel visibility (int32, 0: false, 1: true) | |||
| const Steinberg::FIDString kSelected = "selected"; ///< (R/W) selection state, channel is selected exlusively and scrolled into view on write (int32, 0: false, 1: true) | |||
| const Steinberg::FIDString kMultiSelect = "multiselect"; ///< (W) select channel without unselecting others (int32, 0: false, 1: true) | |||
| const Steinberg::FIDString kFocused = "focused"; ///< (R) focus for user input when multiple channels are selected (int32, 0: false, 1: true) | |||
| const Steinberg::FIDString kRegionName = "regionName"; ///< (R) name of region/event for region/event-based effects (string) | |||
| const Steinberg::FIDString kRegionSelected = "regionSelected"; ///< (R) selection state of region/event for region/event-based effects (int32, 0: false, 1: true) | |||
| // per instance (requires IContextInfoHandler2 on plug-in side) | |||
| const Steinberg::FIDString kVolume = "volume"; ///< (R/W) volume factor [float, 0. = -oo dB, 1. = 0dB, etc.], also available as string | |||
| const Steinberg::FIDString kMaxVolume = "maxVolume"; ///< (R) maximum volume factor [float, 1. = 0dB], also available as string | |||
| const Steinberg::FIDString kPan = "pan"; ///< (R/W) stereo panning [float, < 0.5 = (L), 0.5 = (C), > 0.5 = (R)], also available as string | |||
| const Steinberg::FIDString kMute = "mute"; ///< (R/W) mute (int32, 0: false, 1: true) | |||
| const Steinberg::FIDString kSolo = "solo"; ///< (R/W) solo (int32, 0: false, 1: true) | |||
| const Steinberg::FIDString kSendCount = "sendcount"; ///< (R) send count [int] | |||
| const Steinberg::FIDString kSendLevel = "sendlevel"; ///< (R/W) send level factor, index is appended to id (e.g. "sendlevel0" for first), also available as string | |||
| const Steinberg::FIDString kMaxSendLevel = "maxSendlevel"; ///< (R) maximum send level factor, also available as string | |||
| // global | |||
| const Steinberg::FIDString kActiveDocumentID = "activeDocumentID"; ///< (R) active document identifier, use to get identity of the active document (string) | |||
| const Steinberg::FIDString kDocumentID = "documentID"; ///< (R) document identifier, use to compare identity (string) | |||
| const Steinberg::FIDString kDocumentName = "documentName"; ///< (R) document name, can be displayed to user (string) | |||
| const Steinberg::FIDString kDocumentFolder = "documentFolder"; ///< (R) document folder (string) | |||
| const Steinberg::FIDString kAudioFolder = "audioFolder"; ///< (R) folder for audio files (string) | |||
| const Steinberg::FIDString kIndexMode = "indexMode"; ///< (R) channel index mode (default is flat, see ChannelIndexMode enumeration) | |||
| } | |||
| } // namespace Presonus | |||
| #include "pluginterfaces/base/falignpop.h" | |||
| #endif // _ipslcontextinfo_h | |||
| @@ -0,0 +1,108 @@ | |||
| //************************************************************************************************ | |||
| // | |||
| // PreSonus Plug-In Extensions | |||
| // Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | |||
| // | |||
| // Filename : ipsleditcontroller.h | |||
| // Created by : PreSonus Software Ltd., 02/2017, last updated 10/2017 | |||
| // Description : Plug-in Edit Controller Extension Interface | |||
| // | |||
| //************************************************************************************************ | |||
| /* | |||
| DISCLAIMER: | |||
| The PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | |||
| provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | |||
| PreSonus is not affiliated with the owner of the underlying technology in any way. | |||
| */ | |||
| //************************************************************************************************ | |||
| #ifndef _ipsleditcontroller_h | |||
| #define _ipsleditcontroller_h | |||
| #include "pluginterfaces/vst/vsttypes.h" | |||
| #include "pluginterfaces/base/funknown.h" | |||
| #include "pluginterfaces/base/falignpush.h" | |||
| namespace Steinberg { | |||
| namespace Vst { | |||
| class IEditController; }} | |||
| namespace Presonus { | |||
| /** Parameter extra flags. Used with IEditControllerExtra. */ | |||
| enum ParamExtraFlags | |||
| { | |||
| kParamFlagMicroEdit = 1<<0 ///< parameter should be displayed in host micro view | |||
| }; | |||
| /** Automation mode. Used with IEditControllerExtra. */ | |||
| enum AutomationMode | |||
| { | |||
| kAutomationNone = 0, ///< no automation data available | |||
| kAutomationOff, ///< data available, but mode is set to off | |||
| kAutomationRead, ///< data + read mode | |||
| kAutomationTouch, ///< data + touch mode | |||
| kAutomationLatch, ///< data + latch mode | |||
| kAutomationWrite ///< data + write mode | |||
| }; | |||
| /** Slave mode. Used with ISlaveControllerHandler. */ | |||
| enum SlaveMode | |||
| { | |||
| kSlaveModeNormal, ///< plug-in used in different location following given master | |||
| kSlaveModeLowLatencyClone ///< plug-in used as hidden slave for low latency processing following given master | |||
| }; | |||
| //************************************************************************************************ | |||
| // IEditControllerExtra | |||
| /** Extension to Steinberg::Vst::IEditController with additonal flags and notifications | |||
| not available in the standard edit controller interface. */ | |||
| //************************************************************************************************ | |||
| struct IEditControllerExtra: Steinberg::FUnknown | |||
| { | |||
| /** Get extra flags for given parameter (see ParamExtraFlags). */ | |||
| virtual Steinberg::int32 PLUGIN_API getParamExtraFlags (Steinberg::Vst::ParamID id) = 0; | |||
| /** Set automation mode for given parameter (see AutomationMode). */ | |||
| virtual Steinberg::tresult PLUGIN_API setParamAutomationMode (Steinberg::Vst::ParamID id, Steinberg::int32 automationMode) = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (IEditControllerExtra, 0x50553fd9, 0x1d2c4c24, 0xb410f484, 0xc5fb9f3f) | |||
| //************************************************************************************************ | |||
| // ISlaveControllerHandler | |||
| /** Extension to Steinberg::Vst::IEditController used to notify the plug-in about slave instances. | |||
| The host might decide to use "cloned" (slave) instances in various scenarios, e.g. to process | |||
| audio paths with different latencies simultaneously or to synchronize grouped plug-in instances | |||
| between multiple mixer channels - see SlaveMode. In this case multiple plug-in instances are active | |||
| at the same time even though it looks like one to the user, i.e. only the editor of the master | |||
| instance is visible and can be used to change parameters. The edit controller implementation has | |||
| to synchronize parameter changes between instances that aren't visible to the host internally. | |||
| */ | |||
| //************************************************************************************************ | |||
| struct ISlaveControllerHandler: Steinberg::FUnknown | |||
| { | |||
| /** Add slave edit controller. Implementation must sync non-automatable parameters between | |||
| this instance (master) and given slave instance internally, i.e. when the master (this) | |||
| changes update all connected slaves. | |||
| */ | |||
| virtual Steinberg::tresult PLUGIN_API addSlave (Steinberg::Vst::IEditController* slave, Steinberg::int32 slaveMode) = 0; | |||
| /** Remove slave edit controller. */ | |||
| virtual Steinberg::tresult PLUGIN_API removeSlave (Steinberg::Vst::IEditController* slave) = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (ISlaveControllerHandler, 0xd93894bd, 0x67454c29, 0x977ae2f5, 0xdb380434) | |||
| } // namespace Presonus | |||
| #include "pluginterfaces/base/falignpop.h" | |||
| #endif // _ipsleditcontroller_h | |||
| @@ -0,0 +1,53 @@ | |||
| //************************************************************************************************ | |||
| // | |||
| // PreSonus Plug-In Extensions | |||
| // Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | |||
| // | |||
| // Filename : ipslgainreduction.h | |||
| // Created by : PreSonus Software Ltd., 03/2015 | |||
| // Description : Plug-in Gain Reduction Interface | |||
| // | |||
| //************************************************************************************************ | |||
| /* | |||
| DISCLAIMER: | |||
| The PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | |||
| provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | |||
| PreSonus is not affiliated with the owner of the underlying technology in any way. | |||
| */ | |||
| //************************************************************************************************ | |||
| #ifndef _ipslgainreduction_h | |||
| #define _ipslgainreduction_h | |||
| #include "pluginterfaces/base/funknown.h" | |||
| #include "pluginterfaces/base/falignpush.h" | |||
| namespace Presonus { | |||
| //************************************************************************************************ | |||
| // IGainReductionInfo | |||
| /** Interface to report gain reduction imposed to the audio signal by the plug-in to the | |||
| host for display in the UI. Implemented by the VST3 edit controller class. | |||
| */ | |||
| //************************************************************************************************ | |||
| struct IGainReductionInfo: Steinberg::FUnknown | |||
| { | |||
| /** Get current gain reduction for display. The returned value in dB is either 0.0 (no reduction) | |||
| or negative. The host calls this function periodically while the plug-in is active. | |||
| The value is used AS IS for UI display purposes, without imposing additional ballistics or | |||
| presentation latency compensation. Be sure to return zero if processing is bypassed internally. | |||
| For multiple reduction stages, please report the sum in dB here. | |||
| */ | |||
| virtual double PLUGIN_API getGainReductionValueInDb () = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (IGainReductionInfo, 0x8e3c292c, 0x95924f9d, 0xb2590b1e, 0x100e4198) | |||
| } // namespace Presonus | |||
| #include "pluginterfaces/base/falignpop.h" | |||
| #endif // _ipslgainreduction_h | |||
| @@ -0,0 +1,121 @@ | |||
| //************************************************************************************************ | |||
| // | |||
| // PreSonus Plug-In Extensions | |||
| // Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | |||
| // | |||
| // Filename : ipslhostcommands.h | |||
| // Created by : PreSonus Software Ltd., 11/2009 | |||
| // Description : Host Command Interface | |||
| // | |||
| //************************************************************************************************ | |||
| /* | |||
| DISCLAIMER: | |||
| The PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | |||
| provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | |||
| PreSonus is not affiliated with the owner of the underlying technology in any way. | |||
| */ | |||
| //************************************************************************************************ | |||
| #ifndef _ipslhostcommands_h | |||
| #define _ipslhostcommands_h | |||
| #include "pluginterfaces/vst/vsttypes.h" | |||
| #include "pluginterfaces/base/funknown.h" | |||
| #include "pluginterfaces/base/falignpush.h" | |||
| namespace Steinberg { | |||
| class IPlugView; } | |||
| namespace Presonus { | |||
| struct ICommandList; | |||
| //************************************************************************************************ | |||
| // IHostCommandHandler | |||
| /** Callback interface to access host-specific parameter commands to be integrated | |||
| into a context menu inside the plug-in editor. Implemented as extension of | |||
| Steinberg::Vst::IComponentHandler. | |||
| Please note that the intention of this set of interfaces is not to allow a generic menu | |||
| implementation. This is the responsibility of a GUI toolkit. It basically provides | |||
| a way to enumerate and execute commands anonymously, i.e. the plug-in does not have to | |||
| know the exact sematics of the commands and the host does not break the consistency of | |||
| the plug-in GUI. | |||
| Usage Example: | |||
| IComponentHandler* handler; | |||
| FUnknownPtr<IHostCommandHandler> commandHandler (handler); | |||
| if(commandHandler) | |||
| if(ICommandList* commandList = commandHandler->createParamCommands (kMyParamId)) | |||
| { | |||
| FReleaser commandListReleaser (commandList); | |||
| commandHandler->popupCommandMenu (commandList, xPos, yPos); | |||
| } | |||
| */ | |||
| //************************************************************************************************ | |||
| struct IHostCommandHandler: Steinberg::FUnknown | |||
| { | |||
| /** Create list of currently available host commands for given parameter. | |||
| The command list has a short lifecycle, it is recreated whenever | |||
| a context menu should appear. The returned pointer can be null, otherwise | |||
| it has to be released. */ | |||
| virtual ICommandList* PLUGIN_API createParamCommands (Steinberg::Vst::ParamID tag) = 0; | |||
| /** Helper to popup a command menu at given position. | |||
| Coordinates are relative to view or in screen coordintes if view is null. | |||
| Can be used for testing purpose, if the plug-in does not have its own context menu implementation | |||
| or if it wants to use the look & feel of the host menu. This method is not supposed | |||
| to support command lists implemented by the plug-in. */ | |||
| virtual Steinberg::tresult PLUGIN_API popupCommandMenu (ICommandList* commandList, Steinberg::int32 xPos, Steinberg::int32 yPos, Steinberg::IPlugView* view = 0) = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (IHostCommandHandler, 0xF92032CD, 0x7A84407C, 0xABE6F863, 0x058EA6C2) | |||
| //************************************************************************************************ | |||
| // CommandInfo | |||
| /** Describes a single command. */ | |||
| //************************************************************************************************ | |||
| struct CommandInfo | |||
| { | |||
| Steinberg::Vst::String128 title; ///< command title (possibly localized into active host language) | |||
| Steinberg::int32 flags; ///< command flags | |||
| enum CommandFlags | |||
| { | |||
| kCanExecute = 1<<0, ///< used to display command enabled/disabled | |||
| kIsSeparator = 1<<1, ///< not a command, it's a separator | |||
| kIsChecked = 1<<2 ///< used to display command with a check mark | |||
| }; | |||
| }; | |||
| //************************************************************************************************ | |||
| // ICommandList | |||
| /** Describes a list of commands. */ | |||
| //************************************************************************************************ | |||
| struct ICommandList: Steinberg::FUnknown | |||
| { | |||
| /** Returns the number of commands. */ | |||
| virtual Steinberg::int32 PLUGIN_API getCommandCount () = 0; | |||
| /** Get command information for a given index. */ | |||
| virtual Steinberg::tresult PLUGIN_API getCommandInfo (Steinberg::int32 index, CommandInfo& info) = 0; | |||
| /** Execute command at given index. */ | |||
| virtual Steinberg::tresult PLUGIN_API executeCommand (Steinberg::int32 index) = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (ICommandList, 0xC5A687DB, 0x82F344E9, 0xB378254A, 0x47C4D712) | |||
| } // namespace Presonus | |||
| #include "pluginterfaces/base/falignpop.h" | |||
| #endif // _ipslhostcommands_h | |||
| @@ -0,0 +1,53 @@ | |||
| //************************************************************************************************ | |||
| // | |||
| // PreSonus Plug-In Extensions | |||
| // Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | |||
| // | |||
| // Filename : ipslviewembedding.h | |||
| // Created by : PreSonus Software Ltd., 05/2012 | |||
| // Description : Plug-in View Embedding Interface | |||
| // | |||
| //************************************************************************************************ | |||
| /* | |||
| DISCLAIMER: | |||
| The PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | |||
| provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | |||
| PreSonus is not affiliated with the owner of the underlying technology in any way. | |||
| */ | |||
| //************************************************************************************************ | |||
| #ifndef _ipslviewembedding_h | |||
| #define _ipslviewembedding_h | |||
| #include "pluginterfaces/base/funknown.h" | |||
| #include "pluginterfaces/base/falignpush.h" | |||
| namespace Steinberg { | |||
| class IPlugView; } | |||
| namespace Presonus { | |||
| //************************************************************************************************ | |||
| // IPlugInViewEmbedding | |||
| /** Support for plug-in view embedding, to be implemented by the VST3 controller class. */ | |||
| //************************************************************************************************ | |||
| class IPlugInViewEmbedding: public Steinberg::FUnknown | |||
| { | |||
| public: | |||
| /** Check if view embedding is supported. */ | |||
| virtual Steinberg::TBool PLUGIN_API isViewEmbeddingSupported () = 0; | |||
| /** Inform plug-in that its view will be embedded. */ | |||
| virtual Steinberg::tresult PLUGIN_API setViewIsEmbedded (Steinberg::IPlugView* view, Steinberg::TBool embedded) = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (IPlugInViewEmbedding, 0xda57e6d1, 0x1f3242d1, 0xad9c1a82, 0xfdb95695) | |||
| } // namespace Presonus | |||
| #include "pluginterfaces/base/falignpop.h" | |||
| #endif // _ipslviewembedding_h | |||
| @@ -0,0 +1,67 @@ | |||
| //************************************************************************************************ | |||
| // | |||
| // PreSonus Plug-In Extensions | |||
| // Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | |||
| // | |||
| // Filename : ipslviewscaling.h | |||
| // Created by : PreSonus Software Ltd., 03/2015 | |||
| // Description : Plug-in View DPI Scaling Interface | |||
| // | |||
| //************************************************************************************************ | |||
| /* | |||
| DISCLAIMER: | |||
| The PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | |||
| provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | |||
| PreSonus is not affiliated with the owner of the underlying technology in any way. | |||
| */ | |||
| //************************************************************************************************ | |||
| #ifndef _ipslviewscaling_h | |||
| #define _ipslviewscaling_h | |||
| #include "pluginterfaces/base/funknown.h" | |||
| #include "pluginterfaces/base/falignpush.h" | |||
| namespace Presonus { | |||
| //************************************************************************************************ | |||
| // IPlugInViewScaling | |||
| /** Support for plug-in view content scaling, to be implemented by the VST3 IPlugView class. | |||
| On Windows, if a process is "DPI-aware" and the system DPI setting is different from the default | |||
| value of 96 DPI, the application is responsible to scale the contents of its windows accordingly, | |||
| including child windows provided by 3rd party plug-ins. | |||
| This interface is used by the host to inform the plug-in about the current scaling factor. | |||
| The scaling factor is used to convert user space coordinates aka DIPs (device-independent pixels) | |||
| to physical pixels on screen. | |||
| The plug-in has to be prepared to deal with the following scaling factors: | |||
| 96 DPI = 100% scaling (factor = 1.0) | |||
| 120 DPI = 125% scaling (factor = 1.25) | |||
| 144 DPI = 150% scaling (factor = 1.5) | |||
| 192 DPI = 200% scaling (factor = 2.0) | |||
| On Windows 8.1 or later DPI settings are per monitor. The scaling factor for a window can change | |||
| when it is moved between screens. | |||
| */ | |||
| //************************************************************************************************ | |||
| struct IPlugInViewScaling: Steinberg::FUnknown | |||
| { | |||
| /** Inform the view about the current content scaling factor. The scaling factor can change | |||
| if the window is moved between screens. | |||
| */ | |||
| virtual Steinberg::tresult PLUGIN_API setContentScaleFactor (float factor) = 0; | |||
| static const Steinberg::FUID iid; | |||
| }; | |||
| DECLARE_CLASS_IID (IPlugInViewScaling, 0x65ed9690, 0x8ac44525, 0x8aadef7a, 0x72ea703f) | |||
| } // namespace Presonus | |||
| #include "pluginterfaces/base/falignpop.h" | |||
| #endif // _ipslviewscaling_h | |||
| @@ -0,0 +1,57 @@ | |||
| //************************************************************************************************ | |||
| // | |||
| // PreSonus Plug-In Extensions | |||
| // Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | |||
| // | |||
| // Filename : pslauextensions.h | |||
| // Created by : PreSonus Software Ltd., 08/2017, last updated 10/2017 | |||
| // Description : PreSonus-specific AU API Extensions | |||
| // | |||
| //************************************************************************************************ | |||
| /* | |||
| DISCLAIMER: | |||
| The PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | |||
| provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | |||
| PreSonus is not affiliated with the owner of the underlying technology in any way. | |||
| */ | |||
| //************************************************************************************************ | |||
| #ifndef _pslauextensions_h | |||
| #define _pslauextensions_h | |||
| #ifdef __cplusplus | |||
| namespace Presonus { | |||
| #endif | |||
| ////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| // Property IDs | |||
| ////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| /** This AU property in the global scope is of type CFArrayRef and is writable by the host. | |||
| The elements of the array are of type CFDataRef which encapsulate SlaveMode structures. | |||
| For more details, please check the documentation of Presonus::ISlaveControllerHandler. */ | |||
| static const AudioUnitPropertyID kSlaveEffectsPropID = 0x50534C01; | |||
| ////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| // Data types | |||
| ////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| enum SlaveMode | |||
| { | |||
| kSlaveModeNormal, ///< plug-in used in different location following given master | |||
| kSlaveModeLowLatencyClone ///< plug-in used as hidden slave for low latency processing following given master | |||
| }; | |||
| ////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| struct SlaveEffect | |||
| { | |||
| AudioUnit unit; ///< Audio Unit reference | |||
| SInt32 mode; ///< SlaveMode | |||
| }; | |||
| #ifdef __cplusplus | |||
| } | |||
| #endif | |||
| #endif // _pslauextensions_h | |||
| @@ -0,0 +1,111 @@ | |||
| //************************************************************************************************ | |||
| // | |||
| // PreSonus Plug-In Extensions | |||
| // Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | |||
| // | |||
| // Filename : pslvst2extensions.h | |||
| // Created by : PreSonus Software Ltd., 05/2012, last updated 08/2017 | |||
| // Description : PreSonus-specific VST2 API Extensions | |||
| // | |||
| //************************************************************************************************ | |||
| /* | |||
| DISCLAIMER: | |||
| The PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | |||
| provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | |||
| PreSonus is not affiliated with the owner of the underlying technology in any way. | |||
| */ | |||
| //************************************************************************************************ | |||
| #ifndef _pslvst2extensions_h | |||
| #define _pslvst2extensions_h | |||
| namespace Presonus { | |||
| ////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| // CanDo Strings | |||
| ////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| /** Identifiers to be passed to VST2's canDo() method. */ | |||
| namespace PlugCanDos | |||
| { | |||
| /** Check if view can be resized by the host. */ | |||
| static const char* canDoViewResize = "supportsViewResize"; | |||
| /** Check if view can be embedded by the host. */ | |||
| static const char* canDoViewEmbedding = "supportsViewEmbedding"; | |||
| /** Check if view scaling for high-DPI is supported by the plug-in. */ | |||
| static const char* canDoViewDpiScaling = "supportsViewDpiScaling"; | |||
| /** Check if gain reduction reporting is supported by the plug-in. */ | |||
| static const char* canDoGainReductionInfo = "supportsGainReductionInfo"; | |||
| /** Check if slave effects are supported by plug-in. */ | |||
| static const char* canDoSlaveEffects = "supportsSlaveEffects"; | |||
| } | |||
| ////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| // Opcodes | |||
| ////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| /** Vendor-specific opcodes a VST2 plug-in can implement to add non-standard features like | |||
| embedding its views as subview into the host, resizing from the host, high-DPI scaling, etc. | |||
| Embedding corresponds to the Presonus::IPlugInViewEmbedding VST3 extended interface. | |||
| Resizing works like VST3's checkSizeConstraint() and onSize() methods, VST3's canResize() | |||
| is defined via canDoViewResize. | |||
| For "DPI-aware" host applications on the Windows platform a similar mimic to the | |||
| Presonus::IPlugInViewScaling VST3 extended interface is defined here. | |||
| Gain reduction reporting corresponds to the Presonus::IGainReductionInfo VST3 interface. | |||
| Slave effect handling corresponds to the Presonus::ISlaveControllerHandler VST3 interface. | |||
| */ | |||
| enum Opcodes | |||
| { | |||
| /** PreSonus vendor ID - distinguishes our calls from other VST2 extensions. | |||
| Pass this vendor ID as "index" (aka "lArg1") parameter for vendor specific calls. */ | |||
| kVendorID = 'PreS', | |||
| /** The host can suggest a new editor size, and the plug-in can modify the suggested | |||
| size to a suitable value if it cannot resize to the given values. | |||
| The ptrArg is a ERect* to the input/output rect. This differs from the ERect** | |||
| used by effEditGetRect, because here the rect is owned by the host, not the plug-in. | |||
| The result is 0 on failure, 1 on success. */ | |||
| kEffEditCheckSizeConstraints = 'AeCc', | |||
| /** The host can set a new size after negotiating the size via the above | |||
| kEffEditCheckSizeConstraints, triggering the actual resizing. | |||
| The ptrArg is a ERect* to the input/output rect. This differs from the ERect** | |||
| used by effEditGetRect, because here the rect is owned by the host, not the plug-in. | |||
| The result is 0 on failure, 1 on success. */ | |||
| kEffEditSetRect = 'AeSr', | |||
| /** When the view is embedded, it may need to adjust its UI, e.g. by suppressing | |||
| its built-in resizing facility because this is then controlled by the host. | |||
| The ptrArg is a VstInt32*, pointing to 0 to disable or to 1 to enable embedding. | |||
| Per default, embedding is disabled until the host calls this to indicate otherwise. */ | |||
| kEffEditSetEmbedded = 'AeEm', | |||
| /** Inform the view about the current content scaling factor. The factor is passed in the opt argument. | |||
| For more details, please check the documentation of Presonus::IPlugInViewScaling. */ | |||
| kEffEditSetContentScaleFactor = 'AeCs', | |||
| /** Get current gain reduction for display. The ptrArg is a float* to be set to the dB value. | |||
| For more details, please check the documentation of Presonus::IGainReductionInfo. */ | |||
| kEffGetGainReductionValueInDb = 'GRdB', | |||
| /** Add slave effect. The ptrArg is a pointer to the slave AEffect, the 'opt' float transmits the mode (see enum SlaveMode). | |||
| For more details, please check the documentation of Presonus::ISlaveControllerHandler. */ | |||
| kEffAddSlave = 'AdSl', | |||
| /** Remove slave effect. The ptrArg is a pointer to the slave AEffect. | |||
| For more details, please check the documentation of Presonus::ISlaveControllerHandler. */ | |||
| kEffRemoveSlave = 'RmSl' | |||
| }; | |||
| } // namespace Presonus | |||
| #endif // _pslvst2extensions_h | |||