1 /** 2 * Copyright: Copyright Auburn Sounds 2016 3 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 4 * Authors: Guillaume Piolat 5 */ 6 module dplug.host; 7 8 public import dplug.host.host; 9 public import dplug.host.vst; 10 public import dplug.host.window; 11 12 13 /// Loads an audio plugin. 14 IPluginHost createPluginHost(string dynlibPath) 15 { 16 import std..string; 17 import dplug.core.sharedlib; 18 19 // FUTURE support OSX plugin bundles 20 SharedLib lib; 21 lib.load(dynlibPath); 22 23 auto VSTPluginMain = getVSTEntryPoint(lib); 24 if (VSTPluginMain != null) // is this is a VST plugin? 25 { 26 return new VSTPluginHost(lib); 27 } 28 else 29 throw new Exception(format("Couldn't load plugin '%s': unknown format", dynlibPath)); 30 }