# HG changeset patch # User Chris Cannam # Date 1356130605 0 # Node ID d36c679577a192b06e6ca75fe846c7b75942ed2e # Parent e20d3c23a24307cb53c3619385366f3afc06bb06 Vestigial Vamp plugin thingy diff -r e20d3c23a243 -r d36c679577a1 vamp.yeti --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vamp.yeti Fri Dec 21 22:56:45 2012 +0000 @@ -0,0 +1,39 @@ +module vamp; + +import org.vamp_plugins: Plugin, PluginLoader, PluginLoader$AdapterFlags; +import java.lang: UnsatisfiedLinkError; + +listPlugins () = + (try + map string PluginLoader#getInstance()#listPlugins(); + catch UnsatisfiedLinkError e: + eprintln "Warning: Unable to obtain plugin list:\n\(e)"; + []; + yrt); + +categoryOf key = + list PluginLoader#getInstance()#getPluginCategory(key); + +plugin key p is string -> ~Plugin -> 'a = { + plugin = p, + key, + get identifier () = p#getIdentifier(), + get name () = p#getName(), + get description () = p#getName(), + get maker () = p#getName(), + get copyright () = p#getName(), + get version () = p#getName(), + get category () = PluginLoader#getInstance()#getPluginCategory(key), + }; + +loadPlugin key rate = + plugin key PluginLoader#getInstance()#loadPlugin(key, rate, PluginLoader$AdapterFlags#ADAPT_ALL); + + ///!!! no params, programs [yet] + +{ +get pluginKeys = listPlugins, +loadPlugin, +categoryOf, +} +