summaryrefslogtreecommitdiff
path: root/libs/ardour/vst_plugin.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-21 19:01:50 +0000
committerDavid Robillard <d@drobilla.net>2006-10-21 19:01:50 +0000
commitfedf3d34f32264ac57c6a222b678dc90f2bb1a88 (patch)
treee816c676d12ccc32b7e666792b9a01ab5b5a0367 /libs/ardour/vst_plugin.cc
parent7bd41538d951c3e476655df741adfbebbb990bde (diff)
Merged with trunk R992.
Completely untested other than it compiles, runs, and records somewhat (need to merge again). git-svn-id: svn://localhost/ardour2/branches/midi@999 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r--libs/ardour/vst_plugin.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc
index 5dd32f2d51..800c5a9856 100644
--- a/libs/ardour/vst_plugin.cc
+++ b/libs/ardour/vst_plugin.cc
@@ -103,7 +103,7 @@ VSTPlugin::~VSTPlugin ()
}
void
-VSTPlugin::set_block_size (jack_nframes_t nframes)
+VSTPlugin::set_block_size (nframes_t nframes)
{
deactivate ();
_plugin->dispatcher (_plugin, effSetBlockSize, 0, nframes, NULL, 0.0f);
@@ -212,7 +212,7 @@ VSTPlugin::get_state()
char index[64];
char val[32];
snprintf (index, sizeof (index), "param_%ld", n);
- snprintf (val, sizeof (val), "%f", _plugin->getParameter (_plugin, n));
+ snprintf (val, sizeof (val), "%.12g", _plugin->getParameter (_plugin, n));
parameters->add_property (index, val);
}
@@ -245,6 +245,7 @@ VSTPlugin::set_state(const XMLNode& node)
for (i = child->properties().begin(); i != child->properties().end(); ++i) {
long param;
float val;
+
sscanf ((*i)->name().c_str(), "param_%ld", &param);
sscanf ((*i)->value().c_str(), "%f", &val);
@@ -357,7 +358,7 @@ VSTPlugin::describe_parameter (uint32_t param)
return name;
}
-jack_nframes_t
+nframes_t
VSTPlugin::latency () const
{
return _plugin->initialDelay;
@@ -376,7 +377,7 @@ VSTPlugin::automatable () const
}
int
-VSTPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in_index, int32_t& out_index, jack_nframes_t nframes, jack_nframes_t offset)
+VSTPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in_index, int32_t& out_index, nframes_t nframes, nframes_t offset)
{
float *ins[_plugin->numInputs];
float *outs[_plugin->numOutputs];