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