comparison src/vamp-plugin-sdk-2.4/build/README.osx @ 12:b7bda433d832

Add Vamp SDK source
author Chris Cannam
date Wed, 20 Mar 2013 15:58:35 +0000
parents
children
comparison
equal deleted inserted replaced
11:4d14605afe75 12:b7bda433d832
1
2 The Vamp Plugin SDK -- Platform Notes for OS/X
3 ==============================================
4
5 Prerequisites
6 -------------
7
8 You must have Xcode installed, with the command-line build tools.
9
10 (If you are using Xcode 4, you may have to go to Preferences ->
11 Downloads -> Components and install the Command Line Tools component.)
12
13 You must have libsndfile (http://www.mega-nerd.com/libsndfile/)
14 installed in order to build the command-line host successfully. But
15 you do not need libsndfile if you only want to build plugins.
16
17
18 Building at the command line
19 ----------------------------
20
21 To build the SDK, example plugins, and command-line host:
22
23 $ make -f build/Makefile.osx
24
25 To build only the SDK and example plugins (for example if you do not
26 have libsndfile installed):
27
28 $ make -f build/Makefile.osx sdk examples
29
30 See the comments at the top of Makefile.osx for more information about
31 the libraries and other targets that are built in this way.
32
33 If you are using an IDE such as Xcode, you may prefer to simply add
34 the vamp-sdk and src/vamp-sdk (for plugins) or vamp-hostsdk and
35 src/vamp-hostsdk (for hosts) directories to your existing project.
36
37 If you are using OS/X 10.6 or older, use Makefile.osx.106 instead of
38 Makefile.osx.
39
40
41 Installing the Example Plugins
42 ------------------------------
43
44 To install the example plugins so you can load them in Vamp hosts,
45 copy the files
46
47 examples/vamp-example-plugins.dylib
48 and
49 examples/vamp-example-plugins.cat
50
51 to
52 /Library/Audio/Plug-Ins/Vamp/
53 or
54 $HOME/Library/Audio/Plug-Ins/Vamp/
55
56
57 Plugin Linkage
58 --------------
59
60 Vamp plugins are distributed as dynamic libraries (.dylib). An OS/X
61 dynamic library has a formal installed name, which is recorded in the
62 library's header: you will need to ensure that this matches the
63 plugin's filename (e.g. vamp-example-plugins.dylib) by using the
64 -install_name <name> option at link time. The Makefile.osx provided
65 with the SDK contains an example of this.
66
67 A well-packaged Vamp plugin library should export exactly one public
68 symbol, namely the Vamp API entry point vampGetPluginDescriptor.
69
70 The default for the OS/X linker is to export all of the symbols in the
71 library. This will work (the host will be able to load the plugin),
72 but it unnecessarily pollutes the host's symbol namespace, it may
73 cause symbol collisions in some esoteric circumstances, and it
74 increases the amount of time the plugin takes to load.
75
76 To improve this behaviour, you can instruct the linker to export only
77 the one required symbol using a symbols list file. To do this, place
78 the single line
79
80 _vampGetPluginDescriptor
81
82 (with leading underscore) into a text file, and then use the
83 -exported_symbols_list option to the linker to tell it to refer to
84 this file. All other symbols will then be properly hidden.
85
86 The Makefile.osx included in this SDK uses this method to manage
87 symbol visibility for the included example plugins, using the file
88 build/vamp-plugin.list. There are other methods that will work too,
89 but this one is simple and has the advantage of requiring no changes
90 to the code.
91
92
93 Test Your Plugins
94 -----------------
95
96 The Vamp Plugin Tester is a vital utility which you can use to test
97 your plugins for common problems. It can help you if you're having
98 problems getting your plugin to work at all, and you're strongly
99 advised to use it before you release anything. Download it from the
100 Vamp plugins site now!
101