| 2 |
2 |
The Vamp Plugin SDK -- Platform Notes for Visual C++ on Windows
|
| 3 |
3 |
===============================================================
|
| 4 |
4 |
|
| 5 |
|
Visual C++ Project Files
|
| 6 |
|
------------------------
|
|
5 |
This version of the SDK is contains project files for Visual C++ 2013
|
|
6 |
or newer. You can build the SDK in either 32-bit or 64-bit (x64) mode,
|
|
7 |
but remember that a 32-bit host generally cannot load 64-bit plugins.
|
| 7 |
8 |
|
| 8 |
|
Three Visual C++ project files are included with the SDK:
|
| 9 |
9 |
|
| 10 |
|
- build/VampPluginSDK.vcproj
|
|
10 |
Visual C++ Projects and Solution Files
|
|
11 |
--------------------------------------
|
|
12 |
|
|
13 |
Two Visual C++ solution files are included:
|
|
14 |
|
|
15 |
- build/VampSDK.sln
|
|
16 |
|
|
17 |
Builds the plugin SDK and the example plugins.
|
|
18 |
See the VampPluginSDK and VampExamplePlugins projects below.
|
|
19 |
|
|
20 |
- build/VampHostSDK.sln
|
|
21 |
|
|
22 |
Builds the host SDK and the simple-host command-line application.
|
|
23 |
See the VampHostSDK and VampSimpleHost projects below.
|
|
24 |
Note that the VampSimpleHost requires the libsndfile library; if
|
|
25 |
you want to build without that, use the VampHostSDK project rather
|
|
26 |
than this solution.
|
|
27 |
|
|
28 |
Four Visual C++ project files are included:
|
|
29 |
|
|
30 |
- build/VampPluginSDK.vcxproj
|
| 11 |
31 |
|
| 12 |
32 |
This builds the plugin SDK into a single static library, but does
|
| 13 |
33 |
not build the example plugins, the host SDK, or the host. (We
|
| 14 |
34 |
recommend using static linkage for the SDK rather than distributing
|
| 15 |
35 |
it as a DLL, particularly when building plugins.)
|
| 16 |
36 |
|
| 17 |
|
- build/VampHostSDK.vcproj
|
| 18 |
|
|
| 19 |
|
This builds the host SDK into a single static library, but does not
|
| 20 |
|
build the plugin SDK, example plugins, or host.
|
| 21 |
|
|
| 22 |
|
- build/VampExamplePlugins.vcproj
|
|
37 |
- build/VampExamplePlugins.vcxproj
|
| 23 |
38 |
|
| 24 |
39 |
This builds the example plugins DLL, but does not build the plugin
|
| 25 |
40 |
or host SDKs or the host. You don't need to build the plugin SDK
|
| 26 |
41 |
before this, because this project simply includes the plugin SDK
|
| 27 |
42 |
files rather than using the library.
|
| 28 |
43 |
|
|
44 |
- build/VampHostSDK.vcxproj
|
|
45 |
|
|
46 |
This builds the host SDK into a single static library, but does not
|
|
47 |
build the plugin SDK, example plugins, or host.
|
|
48 |
|
|
49 |
- build/VampSimpleHost.vcxproj
|
|
50 |
|
|
51 |
This builds the simple host command line program. You must have
|
|
52 |
the libsndfile library installed in order to build this project.
|
|
53 |
|
| 29 |
54 |
Of course, when using Visual Studio or another IDE to build a plugin
|
| 30 |
55 |
or host using the SDK, you may simply add the .h and .cpp files in the
|
| 31 |
56 |
vamp-sdk or vamp-hostsdk directories to your existing project. This
|
| 32 |
57 |
is the approach taken in the VampExamplePlugins project.
|
| 33 |
58 |
|
| 34 |
|
As the command-line host has additional library dependencies (namely
|
| 35 |
|
libsndfile), no pre-packaged project is included to build it.
|
| 36 |
|
|
| 37 |
59 |
|
| 38 |
60 |
Installing the Example Plugins
|
| 39 |
61 |
------------------------------
|
| ... | ... | |
| 45 |
67 |
and
|
| 46 |
68 |
examples\vamp-example-plugins.cat
|
| 47 |
69 |
|
| 48 |
|
to
|
|
70 |
to the appropriate location as follows:
|
|
71 |
|
|
72 |
* For 32-bit plugins running on a 32-bit system, and
|
|
73 |
for 64-bit plugins running on a 64-bit system
|
| 49 |
74 |
|
| 50 |
75 |
C:\Program Files\Vamp Plugins
|
| 51 |
76 |
|
|
77 |
* For 32-bit plugins running on a 64-bit system
|
|
78 |
|
|
79 |
C:\Program Files\Vamp Plugins (x86)
|
|
80 |
|
|
81 |
You cannot use 64-bit plugins on a 32-bit system.
|
|
82 |
|
| 52 |
83 |
|
| 53 |
84 |
Plugin Linkage
|
| 54 |
85 |
--------------
|
| ... | ... | |
| 61 |
92 |
linker option /EXPORT:vampGetPluginDescriptor to your project. (All
|
| 62 |
93 |
of the other symbols will be properly hidden, because that is the
|
| 63 |
94 |
default for the Visual Studio linker.) The included example plugins
|
| 64 |
|
project in build/VampExamplePlugins.vcproj does this.
|
|
95 |
project in build/VampExamplePlugins.vcxproj does this.
|
| 65 |
96 |
|
| 66 |
97 |
Alternatively, you may modify vamp/vamp.h to add the
|
| 67 |
98 |
__declspec(dllexport) attribute to the vampGetPluginDescriptor
|
| 68 |
99 |
declaration. This is not present by default, because it isn't
|
| 69 |
|
portable and, as we only want one symbol exported, the above linker
|
| 70 |
|
option works equally well without code changes.
|
|
100 |
portable among compilers and, as we only want one symbol exported, the
|
|
101 |
above linker option works equally well without code changes.
|
| 71 |
102 |
|
| 72 |
103 |
(If you don't take at least one of these actions, your plugin library
|
| 73 |
104 |
simply will not load in any host.)
|