To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / build / README.osx

History | View | Annotate | Download (3.21 KB)

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 (an
9
optional component).
10

    
11
You must have libsndfile (http://www.mega-nerd.com/libsndfile/)
12
installed in order to build the command-line host successfully.  But
13
you do not need libsndfile if you only want to build plugins.
14

    
15

    
16
Building at the command line
17
----------------------------
18

    
19
To build the SDK, example plugins, and command-line host:
20

    
21
 $ make -f build/Makefile.osx
22

    
23
To build only the SDK and example plugins (for example if you do not
24
have libsndfile installed):
25

    
26
 $ make -f build/Makefile.osx sdk plugins
27

    
28
See the comments at the top of Makefile.osx for more information about
29
the libraries and other targets that are built in this way.
30

    
31
If you are using an IDE such as Xcode, you may prefer to add the
32
vamp-sdk and src/vamp-sdk (for plugins) or vamp-hostsdk and
33
src/vamp-hostsdk (for hosts) directories to your existing project.
34

    
35
If you are using OS/X 10.6 or older, you could try Makefile.osx.106
36
instead of Makefile.osx.
37

    
38

    
39
Installing the Example Plugins
40
------------------------------
41

    
42
To install the example plugins so you can load them in Vamp hosts,
43
copy the files
44

    
45
   examples/vamp-example-plugins.dylib
46
and
47
   examples/vamp-example-plugins.cat
48

    
49
to
50
   /Library/Audio/Plug-Ins/Vamp/
51
or 
52
   $HOME/Library/Audio/Plug-Ins/Vamp/
53

    
54

    
55
Plugin Linkage
56
--------------
57

    
58
Vamp plugins are distributed as dynamic libraries (.dylib).  An OS/X
59
dynamic library has a formal installed name, which is recorded in the
60
library's header: you will need to ensure that this matches the
61
plugin's filename (e.g. vamp-example-plugins.dylib) by using the
62
-install_name <name> option at link time.  The Makefile.osx provided
63
with the SDK contains an example of this.
64

    
65
A well-packaged Vamp plugin library should export exactly one public
66
symbol, namely the Vamp API entry point vampGetPluginDescriptor.
67

    
68
The default for the OS/X linker is to export all of the symbols in the
69
library.  This will work (the host will be able to load the plugin),
70
but it unnecessarily pollutes the host's symbol namespace, it may
71
cause symbol collisions in some esoteric circumstances, and it
72
increases the amount of time the plugin takes to load.
73

    
74
To improve this behaviour, you can instruct the linker to export only
75
the one required symbol using a symbols list file.  To do this, place
76
the single line
77

    
78
_vampGetPluginDescriptor
79

    
80
(with leading underscore) into a text file, and then use the
81
-exported_symbols_list option to the linker to tell it to refer to
82
this file.  All other symbols will then be properly hidden.
83

    
84
The Makefile.osx included in this SDK uses this method to manage
85
symbol visibility for the included example plugins, using the file
86
build/vamp-plugin.list.  There are other methods that will work too,
87
but this one is simple and has the advantage of requiring no changes
88
to the code.
89

    
90

    
91
Test Your Plugins
92
-----------------
93

    
94
The Vamp Plugin Tester is a vital utility which you can use to test
95
your plugins for common problems.  It can help you if you're having
96
problems getting your plugin to work at all, and you're strongly
97
advised to use it before you release anything.  Download it from the
98
Vamp plugins site now!
99