Chris@23: Chris@23: The Vamp Plugin SDK -- Platform Notes for OS/X Chris@23: ============================================== Chris@23: Chris@23: Prerequisites Chris@23: ------------- Chris@23: Chris@23: You must have Xcode installed, with the command-line build tools. Chris@23: Chris@23: (If you are using Xcode 4, you may have to go to Preferences -> Chris@23: Downloads -> Components and install the Command Line Tools component.) Chris@23: Chris@23: You must have libsndfile (http://www.mega-nerd.com/libsndfile/) Chris@23: installed in order to build the command-line host successfully. But Chris@23: you do not need libsndfile if you only want to build plugins. Chris@23: Chris@23: Chris@23: Building at the command line Chris@23: ---------------------------- Chris@23: Chris@23: To build the SDK, example plugins, and command-line host: Chris@23: Chris@23: $ make -f build/Makefile.osx Chris@23: Chris@23: To build only the SDK and example plugins (for example if you do not Chris@23: have libsndfile installed): Chris@23: Chris@23: $ make -f build/Makefile.osx sdk examples Chris@23: Chris@23: See the comments at the top of Makefile.osx for more information about Chris@23: the libraries and other targets that are built in this way. Chris@23: Chris@23: If you are using an IDE such as Xcode, you may prefer to simply add Chris@23: the vamp-sdk and src/vamp-sdk (for plugins) or vamp-hostsdk and Chris@23: src/vamp-hostsdk (for hosts) directories to your existing project. Chris@23: Chris@23: If you are using OS/X 10.6 or older, use Makefile.osx.106 instead of Chris@23: Makefile.osx. Chris@23: Chris@23: Chris@23: Installing the Example Plugins Chris@23: ------------------------------ Chris@23: Chris@23: To install the example plugins so you can load them in Vamp hosts, Chris@23: copy the files Chris@23: Chris@23: examples/vamp-example-plugins.dylib Chris@23: and Chris@23: examples/vamp-example-plugins.cat Chris@23: Chris@23: to Chris@23: /Library/Audio/Plug-Ins/Vamp/ Chris@23: or Chris@23: $HOME/Library/Audio/Plug-Ins/Vamp/ Chris@23: Chris@23: Chris@23: Plugin Linkage Chris@23: -------------- Chris@23: Chris@23: Vamp plugins are distributed as dynamic libraries (.dylib). An OS/X Chris@23: dynamic library has a formal installed name, which is recorded in the Chris@23: library's header: you will need to ensure that this matches the Chris@23: plugin's filename (e.g. vamp-example-plugins.dylib) by using the Chris@23: -install_name option at link time. The Makefile.osx provided Chris@23: with the SDK contains an example of this. Chris@23: Chris@23: A well-packaged Vamp plugin library should export exactly one public Chris@23: symbol, namely the Vamp API entry point vampGetPluginDescriptor. Chris@23: Chris@23: The default for the OS/X linker is to export all of the symbols in the Chris@23: library. This will work (the host will be able to load the plugin), Chris@23: but it unnecessarily pollutes the host's symbol namespace, it may Chris@23: cause symbol collisions in some esoteric circumstances, and it Chris@23: increases the amount of time the plugin takes to load. Chris@23: Chris@23: To improve this behaviour, you can instruct the linker to export only Chris@23: the one required symbol using a symbols list file. To do this, place Chris@23: the single line Chris@23: Chris@23: _vampGetPluginDescriptor Chris@23: Chris@23: (with leading underscore) into a text file, and then use the Chris@23: -exported_symbols_list option to the linker to tell it to refer to Chris@23: this file. All other symbols will then be properly hidden. Chris@23: Chris@23: The Makefile.osx included in this SDK uses this method to manage Chris@23: symbol visibility for the included example plugins, using the file Chris@23: build/vamp-plugin.list. There are other methods that will work too, Chris@23: but this one is simple and has the advantage of requiring no changes Chris@23: to the code. Chris@23: Chris@23: Chris@23: Test Your Plugins Chris@23: ----------------- Chris@23: Chris@23: The Vamp Plugin Tester is a vital utility which you can use to test Chris@23: your plugins for common problems. It can help you if you're having Chris@23: problems getting your plugin to work at all, and you're strongly Chris@23: advised to use it before you release anything. Download it from the Chris@23: Vamp plugins site now! Chris@23: