summaryrefslogtreecommitdiff
path: root/public.sdk/samples/vst2.x/again
diff options
context:
space:
mode:
Diffstat (limited to 'public.sdk/samples/vst2.x/again')
-rw-r--r--public.sdk/samples/vst2.x/again/source/again.cpp139
-rw-r--r--public.sdk/samples/vst2.x/again/source/again.h50
-rw-r--r--public.sdk/samples/vst2.x/again/win/again.vcproj396
3 files changed, 585 insertions, 0 deletions
diff --git a/public.sdk/samples/vst2.x/again/source/again.cpp b/public.sdk/samples/vst2.x/again/source/again.cpp
new file mode 100644
index 0000000..9d0af10
--- /dev/null
+++ b/public.sdk/samples/vst2.x/again/source/again.cpp
@@ -0,0 +1,139 @@
+//-------------------------------------------------------------------------------------------------------
+// VST Plug-Ins SDK
+// Version 2.4 $Date: 2006/11/13 09:08:27 $
+//
+// Category : VST 2.x SDK Samples
+// Filename : again.cpp
+// Created by : Steinberg Media Technologies
+// Description : Stereo plugin which applies Gain [-oo, 0dB]
+//
+// © 2006, Steinberg Media Technologies, All Rights Reserved
+//-------------------------------------------------------------------------------------------------------
+
+#include "again.h"
+
+//-------------------------------------------------------------------------------------------------------
+AudioEffect* createEffectInstance (audioMasterCallback audioMaster)
+{
+ return new AGain (audioMaster);
+}
+
+//-------------------------------------------------------------------------------------------------------
+AGain::AGain (audioMasterCallback audioMaster)
+: AudioEffectX (audioMaster, 1, 1) // 1 program, 1 parameter only
+{
+ setNumInputs (2); // stereo in
+ setNumOutputs (2); // stereo out
+ setUniqueID ('Gain'); // identify
+ canProcessReplacing (); // supports replacing output
+ canDoubleReplacing (); // supports double precision processing
+
+ fGain = 1.f; // default to 0 dB
+ vst_strncpy (programName, "Default", kVstMaxProgNameLen); // default program name
+}
+
+//-------------------------------------------------------------------------------------------------------
+AGain::~AGain ()
+{
+ // nothing to do here
+}
+
+//-------------------------------------------------------------------------------------------------------
+void AGain::setProgramName (char* name)
+{
+ vst_strncpy (programName, name, kVstMaxProgNameLen);
+}
+
+//-----------------------------------------------------------------------------------------
+void AGain::getProgramName (char* name)
+{
+ vst_strncpy (name, programName, kVstMaxProgNameLen);
+}
+
+//-----------------------------------------------------------------------------------------
+void AGain::setParameter (VstInt32 index, float value)
+{
+ fGain = value;
+}
+
+//-----------------------------------------------------------------------------------------
+float AGain::getParameter (VstInt32 index)
+{
+ return fGain;
+}
+
+//-----------------------------------------------------------------------------------------
+void AGain::getParameterName (VstInt32 index, char* label)
+{
+ vst_strncpy (label, "Gain", kVstMaxParamStrLen);
+}
+
+//-----------------------------------------------------------------------------------------
+void AGain::getParameterDisplay (VstInt32 index, char* text)
+{
+ dB2string (fGain, text, kVstMaxParamStrLen);
+}
+
+//-----------------------------------------------------------------------------------------
+void AGain::getParameterLabel (VstInt32 index, char* label)
+{
+ vst_strncpy (label, "dB", kVstMaxParamStrLen);
+}
+
+//------------------------------------------------------------------------
+bool AGain::getEffectName (char* name)
+{
+ vst_strncpy (name, "Gain", kVstMaxEffectNameLen);
+ return true;
+}
+
+//------------------------------------------------------------------------
+bool AGain::getProductString (char* text)
+{
+ vst_strncpy (text, "Gain", kVstMaxProductStrLen);
+ return true;
+}
+
+//------------------------------------------------------------------------
+bool AGain::getVendorString (char* text)
+{
+ vst_strncpy (text, "Steinberg Media Technologies", kVstMaxVendorStrLen);
+ return true;
+}
+
+//-----------------------------------------------------------------------------------------
+VstInt32 AGain::getVendorVersion ()
+{
+ return 1000;
+}
+
+//-----------------------------------------------------------------------------------------
+void AGain::processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames)
+{
+ float* in1 = inputs[0];
+ float* in2 = inputs[1];
+ float* out1 = outputs[0];
+ float* out2 = outputs[1];
+
+ while (--sampleFrames >= 0)
+ {
+ (*out1++) = (*in1++) * fGain;
+ (*out2++) = (*in2++) * fGain;
+ }
+}
+
+//-----------------------------------------------------------------------------------------
+void AGain::processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames)
+{
+ double* in1 = inputs[0];
+ double* in2 = inputs[1];
+ double* out1 = outputs[0];
+ double* out2 = outputs[1];
+ double dGain = fGain;
+
+ while (--sampleFrames >= 0)
+ {
+ (*out1++) = (*in1++) * dGain;
+ (*out2++) = (*in2++) * dGain;
+ }
+}
diff --git a/public.sdk/samples/vst2.x/again/source/again.h b/public.sdk/samples/vst2.x/again/source/again.h
new file mode 100644
index 0000000..f241dfa
--- /dev/null
+++ b/public.sdk/samples/vst2.x/again/source/again.h
@@ -0,0 +1,50 @@
+//-------------------------------------------------------------------------------------------------------
+// VST Plug-Ins SDK
+// Version 2.4 $Date: 2006/11/13 09:08:27 $
+//
+// Category : VST 2.x SDK Samples
+// Filename : again.h
+// Created by : Steinberg Media Technologies
+// Description : Stereo plugin which applies Gain [-oo, 0dB]
+//
+// © 2006, Steinberg Media Technologies, All Rights Reserved
+//-------------------------------------------------------------------------------------------------------
+
+#ifndef __again__
+#define __again__
+
+#include "public.sdk/source/vst2.x/audioeffectx.h"
+
+//-------------------------------------------------------------------------------------------------------
+class AGain : public AudioEffectX
+{
+public:
+ AGain (audioMasterCallback audioMaster);
+ ~AGain ();
+
+ // Processing
+ virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);
+ virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames);
+
+ // Program
+ virtual void setProgramName (char* name);
+ virtual void getProgramName (char* name);
+
+ // Parameters
+ virtual void setParameter (VstInt32 index, float value);
+ virtual float getParameter (VstInt32 index);
+ virtual void getParameterLabel (VstInt32 index, char* label);
+ virtual void getParameterDisplay (VstInt32 index, char* text);
+ virtual void getParameterName (VstInt32 index, char* text);
+
+ virtual bool getEffectName (char* name);
+ virtual bool getVendorString (char* text);
+ virtual bool getProductString (char* text);
+ virtual VstInt32 getVendorVersion ();
+
+protected:
+ float fGain;
+ char programName[kVstMaxProgNameLen + 1];
+};
+
+#endif
diff --git a/public.sdk/samples/vst2.x/again/win/again.vcproj b/public.sdk/samples/vst2.x/again/win/again.vcproj
new file mode 100644
index 0000000..5140d09
--- /dev/null
+++ b/public.sdk/samples/vst2.x/again/win/again.vcproj
@@ -0,0 +1,396 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="again"
+ ProjectGUID="{59248302-52E0-4CC0-9BBE-E475BA4A9B41}"
+ RootNamespace="again"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;AGAIN_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ ModuleDefinitionFile="../../win/vstplug.def"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;AGAIN_EXPORTS;VST_64BIT_PLATFORM=1;_CRT_SECURE_NO_DEPRECATE=1"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ ModuleDefinitionFile="../../win/vstplug.def"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;AGAIN_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ ModuleDefinitionFile="../../win/vstplug.def"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="0"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;AGAIN_EXPORTS;VST_64BIT_PLATFORM=1;_CRT_SECURE_NO_DEPRECATE=1"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ ModuleDefinitionFile="../../win/vstplug.def"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\source\again.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\source\again.h"
+ >
+ </File>
+ <Filter
+ Name="vst2.x"
+ >
+ <File
+ RelativePath="..\..\..\..\source\vst2.x\aeffeditor.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\source\vst2.x\audioeffect.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\source\vst2.x\audioeffect.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\source\vst2.x\audioeffectx.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\source\vst2.x\audioeffectx.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\source\vst2.x\vstplugmain.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Interfaces"
+ >
+ <File
+ RelativePath="..\..\..\..\..\pluginterfaces\vst2.x\aeffect.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\pluginterfaces\vst2.x\aeffectx.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\pluginterfaces\vst2.x\vstfxstore.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>