Add TAL-Reverb-II plugin to test
[juce-lv2.git] / juce / source / src / audio / plugin_client / RTAS / juce_RTAS_DigiCode3.cpp
blobb76e38997d0eed770f544e05e7446d58c268efb4
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #include "juce_RTAS_DigiCode_Header.h"
29 This file is used to include and build the required digidesign CPP files without your project
30 needing to reference the files directly. Because these files will be found via your include path,
31 this means that the project doesn't have to change to cope with people's SDKs being in different
32 locations.
34 Important note on Windows: In your project settings for the three juce_RTAS_DigiCode.cpp files and
35 the juce_RTAS_Wrapper.cpp file, you need to set the calling convention to "__stdcall".
36 If you don't do this, you'll get some unresolved externals and will spend a long time wondering what's
37 going on... All the other files in your project can be set to use the normal __cdecl convention.
39 If you get an error building the includes statements below, check your paths - there's a full
40 list of the necessary Digidesign paths in juce_RTAS_Wrapper.cpp
43 #if JucePlugin_Build_RTAS
46 #if WINDOWS_VERSION
47 //==============================================================================
49 #undef _UNICODE
50 #undef UNICODE
52 #if JucePlugin_Build_VST
54 #define DllMain DllMainRTAS
55 #include <DLLMain.cpp>
56 #undef DllMain
58 extern BOOL WINAPI DllMainVST (HINSTANCE instance, DWORD dwReason, LPVOID);
60 // This overloaded DllMain can work as either an RTAS or a VST..
61 extern "C" BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD ul_reason_for_call, LPVOID lpReserved)
63 if (GetModuleHandle (_T("DAE.DLL")) != 0)
64 return DllMainRTAS (hInstance, ul_reason_for_call, lpReserved);
65 else
66 return DllMainVST (hInstance, ul_reason_for_call, lpReserved);
68 #else
69 #include <DLLMain.cpp>
70 #endif
72 #include <DefaultSwap.cpp>
74 #else
75 //==============================================================================
76 #include <PlugInInitialize.cpp>
77 #include <Dispatcher.cpp>
78 #endif
80 #else
82 #if _MSC_VER
83 // (defining these stubs just makes it easier to quickly turn off the RTAS build without removing
84 // the exports table from your project settings)
85 short __stdcall NewPlugIn (void*) { return 0; }
86 short __stdcall _PI_GetRoutineDescriptor (long, void*) { return 0; }
87 #endif
89 #endif