projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Commit read-only stack security fix for 64bit processors.
[ardour.git]
/
libs
/
ardour
/
vst_plugin.cc
diff --git
a/libs/ardour/vst_plugin.cc
b/libs/ardour/vst_plugin.cc
index 4c09ba34401ed848a7e84e5bd19bf642e39480b0..800c5a98561f84d141f4f6f492b8ecd8789457c2 100644
(file)
--- a/
libs/ardour/vst_plugin.cc
+++ b/
libs/ardour/vst_plugin.cc
@@
-98,12
+98,12
@@
VSTPlugin::VSTPlugin (const VSTPlugin &other)
VSTPlugin::~VSTPlugin ()
{
deactivate ();
VSTPlugin::~VSTPlugin ()
{
deactivate ();
- GoingAway (
this
); /* EMIT SIGNAL */
+ GoingAway (); /* EMIT SIGNAL */
fst_close (_fst);
}
void
fst_close (_fst);
}
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);
{
deactivate ();
_plugin->dispatcher (_plugin, effSetBlockSize, 0, nframes, NULL, 0.0f);
@@
-174,9
+174,9
@@
VSTPlugin::get_state()
if (stat (path.c_str(), &sbuf)) {
if (errno == ENOENT) {
if (stat (path.c_str(), &sbuf)) {
if (errno == ENOENT) {
- if (
mkdir
(path.c_str(), 0600)) {
+ if (
g_mkdir_with_parents
(path.c_str(), 0600)) {
error << string_compose (_("cannot create VST chunk directory: %1"),
error << string_compose (_("cannot create VST chunk directory: %1"),
- strerror (errno))
+
strerror (errno))
<< endmsg;
return *root;
}
<< endmsg;
return *root;
}
@@
-212,7
+212,7
@@
VSTPlugin::get_state()
char index[64];
char val[32];
snprintf (index, sizeof (index), "param_%ld", n);
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);
}
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;
for (i = child->properties().begin(); i != child->properties().end(); ++i) {
long param;
float val;
+
sscanf ((*i)->name().c_str(), "param_%ld", ¶m);
sscanf ((*i)->value().c_str(), "%f", &val);
sscanf ((*i)->name().c_str(), "param_%ld", ¶m);
sscanf ((*i)->value().c_str(), "%f", &val);
@@
-357,7
+358,7
@@
VSTPlugin::describe_parameter (uint32_t param)
return name;
}
return name;
}
-
jack_
nframes_t
+nframes_t
VSTPlugin::latency () const
{
return _plugin->initialDelay;
VSTPlugin::latency () const
{
return _plugin->initialDelay;
@@
-376,7
+377,7
@@
VSTPlugin::automatable () const
}
int
}
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];
{
float *ins[_plugin->numInputs];
float *outs[_plugin->numOutputs];