1 //------------------------------------------------------------------------ 2 // Project : VST SDK 3 // 4 // Category : Examples 5 // Filename : public.sdk/samples/vst/again/source/againentry.cpp 6 // Created by : Steinberg, 04/2005 7 // Description : AGain Example for VST 3 8 // 9 //----------------------------------------------------------------------------- 10 // LICENSE 11 // (c) 2020, Steinberg Media Technologies GmbH, All Rights Reserved 12 //----------------------------------------------------------------------------- 13 // Redistribution and use in source and binary forms, with or without modification, 14 // are permitted provided that the following conditions are met: 15 // 16 // * Redistributions of source code must retain the above copyright notice, 17 // this list of conditions and the following disclaimer. 18 // * Redistributions in binary form must reproduce the above copyright notice, 19 // this list of conditions and the following disclaimer in the documentation 20 // and/or other materials provided with the distribution. 21 // * Neither the name of the Steinberg Media Technologies nor the names of its 22 // contributors may be used to endorse or promote products derived from this 23 // software without specific prior written permission. 24 // 25 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 26 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 27 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 28 // IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 29 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 30 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 32 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 33 // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 34 // OF THE POSSIBILITY OF SUCH DAMAGE. 35 //----------------------------------------------------------------------------- 36 37 #include "again.h" // for AGain 38 #include "againsidechain.h" // for AGain SideChain 39 #include "againcontroller.h" // for AGainController 40 #include "againcids.h" // for class ids and categrory 41 #include "version.h" // for versioning 42 43 #include "public.sdk/source/main/pluginfactory.h" 44 45 #define stringPluginName "AGain VST3" 46 #define stringPluginSideChainName "AGain SideChain VST3" 47 48 #if TARGET_OS_IPHONE 49 #include "public.sdk/source/vst/vstguieditor.h" 50 extern void* moduleHandle; 51 #endif 52 53 //------------------------------------------------------------------------ 54 // Module init/exit 55 //------------------------------------------------------------------------ 56 57 //------------------------------------------------------------------------ 58 // called after library was loaded 59 bool InitModule () 60 { 61 #if TARGET_OS_IPHONE 62 Steinberg::Vst::VSTGUIEditor::setBundleRef (moduleHandle); 63 #endif 64 return true; 65 } 66 67 //------------------------------------------------------------------------ 68 // called after library is unloaded 69 bool DeinitModule () 70 { 71 return true; 72 } 73 74 using namespace Steinberg::Vst; 75 76 //------------------------------------------------------------------------ 77 // VST Plug-in Entry 78 //------------------------------------------------------------------------ 79 // Windows: do not forget to include a .def file in your project to export 80 // GetPluginFactory function! 81 //------------------------------------------------------------------------ 82 83 BEGIN_FACTORY_DEF ("Steinberg Media Technologies", 84 "http://www.steinberg.net", 85 "mailto:info@steinberg.de") 86 87 //---First plug-in included in this factory------- 88 // its kVstAudioEffectClass component 89 DEF_CLASS2 (INLINE_UID_FROM_FUID(AGainProcessorUID), 90 PClassInfo::kManyInstances, // cardinality 91 kVstAudioEffectClass, // the component category (do not changed this) 92 stringPluginName, // here the plug-in name (to be changed) 93 Vst::kDistributable, // means that component and controller could be distributed on different computers 94 AGainVST3Category, // Subcategory for this plug-in (to be changed) 95 FULL_VERSION_STR, // Plug-in version (to be changed) 96 kVstVersionString, // the VST 3 SDK version (do not changed this, use always this define) 97 Steinberg::Vst::AGain::createInstance) // function pointer called when this component should be instantiated 98 99 // its kVstComponentControllerClass component 100 DEF_CLASS2 (INLINE_UID_FROM_FUID (AGainControllerUID), 101 PClassInfo::kManyInstances, // cardinality 102 kVstComponentControllerClass,// the Controller category (do not changed this) 103 stringPluginName "Controller", // controller name (could be the same than component name) 104 0, // not used here 105 "", // not used here 106 FULL_VERSION_STR, // Plug-in version (to be changed) 107 kVstVersionString, // the VST 3 SDK version (do not changed this, use always this define) 108 Steinberg::Vst::AGainController::createInstance)// function pointer called when this component should be instantiated 109 110 //---Second plug-in (AGain with sidechain (only component, use the same controller) included in this factory------- 111 DEF_CLASS2 (INLINE_UID_FROM_FUID(AGainWithSideChainProcessorUID), 112 PClassInfo::kManyInstances, // cardinality 113 kVstAudioEffectClass, // the component category (do not changed this) 114 stringPluginSideChainName, // here the plug-in name (to be changed) 115 Vst::kDistributable, // means that component and controller could be distributed on different computers 116 AGainVST3Category, // Subcategory for this plug-in (to be changed) 117 FULL_VERSION_STR, // Plug-in version (to be changed) 118 kVstVersionString, // the VST 3 SDK version (do not changed this, use always this define) 119 Steinberg::Vst::AGainWithSideChain::createInstance) // function pointer called when this component should be instantiated 120 121 //----for others plug-ins contained in this factory, put like for the first plug-in different DEF_CLASS2--- 122 123 END_FACTORY 124