13
0

shraed_ptr<> etc. fixes for VST's. VST support now compiles, but doesn't

run for some reason.


git-svn-id: svn://localhost/ardour2/trunk@759 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Sampo Savolainen 2006-08-05 11:46:13 +00:00
parent dca612e82a
commit 0eb03e1afe
4 changed files with 12 additions and 9 deletions

View File

@ -31,17 +31,17 @@ using namespace Gtk;
using namespace ARDOUR;
using namespace PBD;
VSTPluginUI::VSTPluginUI (PluginInsert& pi, VSTPlugin& vp)
VSTPluginUI::VSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr<VSTPlugin> vp)
: PlugUIBase (pi),
vst (vp)
{
fst_run_editor (vst.fst());
fst_run_editor (vst->fst());
preset_box.pack_end (bypass_button, false, false, 10);
preset_box.pack_end (save_button, false, false);
preset_box.pack_end (combo, false, false);
bypass_button.set_active (!insert.active());
bypass_button.set_active (!insert->active());
pack_start (preset_box, false, false);
pack_start (socket, true, true);
@ -55,7 +55,7 @@ VSTPluginUI::~VSTPluginUI ()
int
VSTPluginUI::get_preferred_height ()
{
return vst.fst()->height;
return vst->fst()->height;
}
int
@ -69,7 +69,7 @@ VSTPluginUI::package (Gtk::Window& win)
this assumes that the window's owner understands the XEmbed protocol.
*/
socket.add_id (fst_get_XID (vst.fst()));
socket.add_id (fst_get_XID (vst->fst()));
return 0;
}

View File

@ -106,6 +106,7 @@ class VSTPlugin : public ARDOUR::Plugin
class VSTPluginInfo : public PluginInfo
{
public:
VSTPluginInfo () {}
~VSTPluginInfo () {}

View File

@ -382,7 +382,7 @@ PluginManager::vst_discover (string path)
<< endl;
}
PluginInfoPtr info(new PluginInfo);
PluginInfoPtr info(new VSTPluginInfo);
/* what a goddam joke freeware VST is */

View File

@ -488,9 +488,11 @@ VSTPluginInfo::load (Session& session)
if (Config->get_use_vst()) {
FSTHandle* handle;
if ((handle = fst_load (info->path.c_str())) == 0) {
error << string_compose(_("VST: cannot load module from \"%1\""), info->path) << endmsg;
handle = fst_load(path.c_str());
if ( (int)handle == -1) {
error << string_compose(_("VST: cannot load module from \"%1\""), path) << endmsg;
} else {
plugin.reset (new VSTPlugin (session.engine(), session, handle));
}