vstaudioeffect.h

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 // Project     : VST SDK
00003 // Version     : 3.0
00004 //
00005 // Category    : Helpers
00006 // Filename    : vstaudioeffect.h
00007 // Created by  : Steinberg, 04/2005
00008 // Modified    : $Date: 2008/01/09 12:51:06 $
00009 // Description : Basic Audio Effect Implementation
00010 //
00011 //-----------------------------------------------------------------------------
00012 // LICENSE
00013 // © 2008, Steinberg Media Technologies GmbH, All Rights Reserved
00014 //-----------------------------------------------------------------------------
00015 // This Software Development Kit may not be distributed in parts or its entirety  
00016 // without prior written agreement by Steinberg Media Technologies GmbH. 
00017 // This SDK must not be used to re-engineer or manipulate any technology used  
00018 // in any Steinberg or Third-party application or software module, 
00019 // unless permitted by law.
00020 // Neither the name of the Steinberg Media Technologies nor the names of its
00021 // contributors may be used to endorse or promote products derived from this 
00022 // software without specific prior written permission.
00023 // 
00024 // THIS SDK IS PROVIDED BY STEINBERG MEDIA TECHNOLOGIES GMBH "AS IS" AND
00025 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
00026 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00027 // IN NO EVENT SHALL STEINBERG MEDIA TECHNOLOGIES GMBH BE LIABLE FOR ANY DIRECT, 
00028 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
00029 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
00030 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
00031 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
00032 // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
00033 // OF THE POSSIBILITY OF SUCH DAMAGE.
00034 //----------------------------------------------------------------------------------
00035 
00036 #ifndef __vstaudioeffect__
00037 #define __vstaudioeffect__
00038 
00039 #include "vstcomponent.h"
00040 #include "pluginterfaces/vst/ivstaudioprocessor.h"
00041 
00042 //------------------------------------------------------------------------
00043 namespace Steinberg {
00044 namespace Vst {
00045 
00046 //------------------------------------------------------------------------
00047 // AudioBus
00048 //------------------------------------------------------------------------
00050 class AudioBus: public Bus
00051 {
00052 public:
00053 //------------------------------------------------------------------------
00054         AudioBus (const TChar* name, BusType busType, int32 flags, SpeakerArrangement arr);
00055 
00057         SpeakerArrangement getArrangement () const { return speakerArr; }
00059         void setArrangement (const SpeakerArrangement& arr) { speakerArr = arr; }
00060 
00061         //---from Bus---------------------
00063         virtual bool getInfo (BusInfo& info);
00064 //------------------------------------------------------------------------
00065 protected:
00066         SpeakerArrangement speakerArr;
00067 };
00068 
00069 //------------------------------------------------------------------------
00070 // AudioEffect
00071 //------------------------------------------------------------------------
00072 class AudioEffect: public Component,
00073                                    public IAudioProcessor
00074 {
00075 public:
00076 //------------------------------------------------------------------------
00078         AudioEffect ();
00079 
00080         //---Internal Methods-----------
00082         AudioBus* addAudioInput (const TChar* name, SpeakerArrangement arr, 
00083                                                          BusType busType = kMain, int32 flags = BusInfo::kDefaultActive);
00084 
00086         AudioBus* addAudioOutput (const TChar* name, SpeakerArrangement arr, 
00087                                                           BusType busType = kMain, int32 flags = BusInfo::kDefaultActive);
00088 
00090         EventBus* addEventInput (const TChar* name, int32 channels = 16, 
00091                                                       BusType busType = kMain, int32 flags = BusInfo::kDefaultActive);
00092 
00094         EventBus* addEventOutput (const TChar* name, int32 channels = 16, 
00095                                                           BusType busType = kMain, int32 flags = BusInfo::kDefaultActive);
00096 
00097         //---from IAudioProcessor-------
00098         tresult PLUGIN_API setBusArrangements (SpeakerArrangement* inputs, int32 numIns, SpeakerArrangement* outputs, int32 numOuts);
00099         tresult PLUGIN_API getBusArrangement (BusDirection dir, int32 busIndex, SpeakerArrangement& arr);
00100         tresult PLUGIN_API canProcessSampleSize (int32 symbolicSampleSize);
00101         uint32 PLUGIN_API getLatencySamples () { return 0; } 
00102         tresult PLUGIN_API setupProcessing (ProcessSetup& setup);
00103         tresult PLUGIN_API setProcessing (TBool state);
00104         tresult PLUGIN_API process (ProcessData& data);
00105         uint32 PLUGIN_API getTailSamples () { return 0; }
00106 
00107         //---from Component--------------
00108         DELEGATE_REFCOUNT (Component)
00109         tresult PLUGIN_API queryInterface (const char* iid, void** obj);
00110 //------------------------------------------------------------------------
00111 protected:
00112         ProcessSetup processSetup;
00113 };
00114 
00115 //------------------------------------------------------------------------
00116 } // namespace Vst
00117 } // namespace Steinberg
00118 
00119 #endif  // __vstaudioeffect__
Empty

Copyright ©2008 Steinberg Media Technologies. All Rights Reserved.