mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-08 14:45:43 +01:00
tweaks to get a VST-supporting 3.0 to build & startup
git-svn-id: svn://localhost/ardour2/branches/3.0@4705 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
2c7b27d7ae
commit
9d52ae2f19
6 changed files with 30 additions and 46 deletions
|
|
@ -1194,3 +1194,5 @@ RouteUI::adjust_latency ()
|
|||
{
|
||||
LatencyDialog dialog (_route->name() + _("latency"), *(_route.get()), _session.frame_rate(), _session.engine().frames_per_cycle());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -66,13 +66,13 @@ class VSTPlugin : public ARDOUR::Plugin
|
|||
void set_parameter (uint32_t port, float val);
|
||||
float get_parameter (uint32_t port) const;
|
||||
int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
|
||||
std::set<uint32_t> automatable() const;
|
||||
std::set<Evoral::Parameter> automatable() const;
|
||||
uint32_t nth_parameter (uint32_t port, bool& ok) const;
|
||||
void activate ();
|
||||
void deactivate ();
|
||||
void set_block_size (nframes_t nframes);
|
||||
int connect_and_run (BufferSet&, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset);
|
||||
string describe_parameter (uint32_t);
|
||||
string describe_parameter (Evoral::Parameter);
|
||||
string state_node_name() const { return "vst"; }
|
||||
void print_parameter (uint32_t, char*, uint32_t len) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -528,8 +528,8 @@ PluginManager::vst_discover (string path)
|
|||
info->path = path;
|
||||
info->creator = finfo->creator;
|
||||
info->index = 0;
|
||||
info->n_inputs = finfo->numInputs;
|
||||
info->n_outputs = finfo->numOutputs;
|
||||
info->n_inputs.set_audio (finfo->numInputs);
|
||||
info->n_outputs.set_audio (finfo->numOutputs);
|
||||
info->type = ARDOUR::VST;
|
||||
|
||||
_vst_plugin_info.push_back (info);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
#include <cstdio>
|
||||
|
||||
#include <fst.h>
|
||||
#include <vst/aeffectx.h>
|
||||
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/vst_plugin.h"
|
||||
|
|
|
|||
|
|
@ -41,13 +41,14 @@
|
|||
#include "pbd/pathscanner.h"
|
||||
#include "pbd/xml++.h"
|
||||
|
||||
#include <vst/aeffectx.h>
|
||||
#include <fst.h>
|
||||
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
#include "ardour/vst_plugin.h"
|
||||
#include "ardour/buffer_set.h"
|
||||
#include "ardour/audio_buffer.h"
|
||||
|
||||
#include "pbd/stl_delete.h"
|
||||
|
||||
|
|
@ -82,7 +83,7 @@ VSTPlugin::VSTPlugin (AudioEngine& e, Session& session, FSTHandle* h)
|
|||
|
||||
_plugin->dispatcher (_plugin, effSetProgram, 0, 0, NULL, 0.0f);
|
||||
|
||||
Plugin::setup_controls ();
|
||||
// Plugin::setup_controls ();
|
||||
}
|
||||
|
||||
VSTPlugin::VSTPlugin (const VSTPlugin &other)
|
||||
|
|
@ -94,8 +95,8 @@ VSTPlugin::VSTPlugin (const VSTPlugin &other)
|
|||
throw failed_constructor();
|
||||
}
|
||||
_plugin = _fst->plugin;
|
||||
|
||||
Plugin::setup_controls ();
|
||||
|
||||
// Plugin::setup_controls ();
|
||||
}
|
||||
|
||||
VSTPlugin::~VSTPlugin ()
|
||||
|
|
@ -158,43 +159,27 @@ VSTPlugin::get_state()
|
|||
}
|
||||
|
||||
/* save it to a file */
|
||||
|
||||
Glib::ustring path = Glib::build_filename (get_user_ardour_path (), "vst");
|
||||
struct stat sbuf;
|
||||
|
||||
|
||||
sys::path user_vst_directory(user_config_directory());
|
||||
|
||||
user_vst_directory /= "vst";
|
||||
path = user_vst_directory.to_string();
|
||||
|
||||
if (stat (path.c_str(), &sbuf)) {
|
||||
if (errno == ENOENT) {
|
||||
if (g_mkdir_with_parents (path.c_str(), 0600)) {
|
||||
error << string_compose (_("cannot create VST chunk directory: %1"),
|
||||
strerror (errno))
|
||||
<< endmsg;
|
||||
return *root;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
warning << string_compose (_("cannot check VST chunk directory: %1"), strerror (errno))
|
||||
<< endmsg;
|
||||
return *root;
|
||||
}
|
||||
|
||||
} else if (!S_ISDIR (sbuf.st_mode)) {
|
||||
error << string_compose (_("%1 exists but is not a directory"), path)
|
||||
<< endmsg;
|
||||
try {
|
||||
sys::create_directories (user_vst_directory);
|
||||
}
|
||||
catch (const sys::filesystem_error& ex)
|
||||
{
|
||||
error << "Could not create user configuration directory" << endmsg;
|
||||
return *root;
|
||||
}
|
||||
|
||||
path = Glib::build_filename (path, "something");
|
||||
sys::path file (user_vst_directory);
|
||||
|
||||
file /= "something";
|
||||
|
||||
/* store information */
|
||||
|
||||
XMLNode* chunk_node = new XMLNode (X_("chunk"));
|
||||
chunk_node->add_property ("path", path);
|
||||
chunk_node->add_property ("path", file.to_string());
|
||||
|
||||
root->add_child_nocopy (*chunk_node);
|
||||
|
||||
|
|
@ -348,10 +333,10 @@ VSTPlugin::save_preset (string name)
|
|||
}
|
||||
|
||||
string
|
||||
VSTPlugin::describe_parameter (uint32_t param)
|
||||
VSTPlugin::describe_parameter (Evoral::Parameter param)
|
||||
{
|
||||
char name[64];
|
||||
_plugin->dispatcher (_plugin, effGetParamName, param, 0, name, 0);
|
||||
_plugin->dispatcher (_plugin, effGetParamName, param.id(), 0, name, 0);
|
||||
return name;
|
||||
}
|
||||
|
||||
|
|
@ -369,13 +354,13 @@ VSTPlugin::signal_latency () const
|
|||
#endif
|
||||
}
|
||||
|
||||
set<uint32_t>
|
||||
set<Evoral::Parameter>
|
||||
VSTPlugin::automatable () const
|
||||
{
|
||||
set<uint32_t> ret;
|
||||
set<Evoral::Parameter> ret;
|
||||
|
||||
for (uint32_t i = 0; i < parameter_count(); ++i){
|
||||
ret.insert (ret.end(), i);
|
||||
ret.insert (ret.end(), Evoral::Parameter(PluginAutomation, 0, i));
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -474,11 +459,9 @@ VSTPlugin::has_editor () const
|
|||
void
|
||||
VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const
|
||||
{
|
||||
char lab[9];
|
||||
char *first_nonws;
|
||||
|
||||
_plugin->dispatcher (_plugin, effGetParamLabel, param, 0, lab, 0);
|
||||
_plugin->dispatcher (_plugin, effGetParamDisplay, param, 0, buf, 0);
|
||||
_plugin->dispatcher (_plugin, 7 /* effGetParamDisplay */, param, 0, buf, 0);
|
||||
|
||||
if (buf[0] == '\0') {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
. ../gtk2_ardour/ardev_common.sh
|
||||
|
||||
export LD_LIBRARY_PATH=gtk2_ardour:$LD_LIBRARY_PATH
|
||||
exec wine ./vst/ardour_vst.exe.so "$@"
|
||||
export LD_LIBRARY_PATH=../gtk2_ardour:$LD_LIBRARY_PATH
|
||||
exec wine $TOP/vst/ardour_vst.exe.so "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue