mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-20 12:26:07 +01:00
fixes for OS X compile of last commit
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6681 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
cd9968d473
commit
032d2cbf5d
10 changed files with 25 additions and 13 deletions
|
|
@ -80,7 +80,7 @@ class AUPlugin : public ARDOUR::Plugin
|
|||
void activate ();
|
||||
void deactivate ();
|
||||
void flush ();
|
||||
void set_block_size (nframes_t nframes);
|
||||
int set_block_size (nframes_t nframes);
|
||||
|
||||
int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
|
||||
std::set<uint32_t> automatable() const;
|
||||
|
|
@ -109,6 +109,10 @@ class AUPlugin : public ARDOUR::Plugin
|
|||
int32_t configure_io (int32_t in, int32_t out);
|
||||
bool requires_fixed_size_buffers() const;
|
||||
|
||||
void set_fixed_size_buffers (bool yn) {
|
||||
_requires_fixed_size_buffers = yn;
|
||||
}
|
||||
|
||||
boost::shared_ptr<CAAudioUnit> get_au () { return unit; }
|
||||
boost::shared_ptr<CAComponent> get_comp () const { return comp; }
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class PluginInsert : public Insert
|
|||
void deactivate ();
|
||||
void flush ();
|
||||
|
||||
void set_block_size (nframes_t nframes);
|
||||
int set_block_size (nframes_t nframes);
|
||||
|
||||
uint32_t output_streams() const;
|
||||
uint32_t input_streams() const;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class LadspaPlugin : public ARDOUR::Plugin
|
|||
_descriptor->cleanup (_handle);
|
||||
}
|
||||
|
||||
void set_block_size (nframes_t nframes) {}
|
||||
int set_block_size (nframes_t nframes) {return 0; }
|
||||
|
||||
int connect_and_run (std::vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
|
||||
std::string describe_parameter (uint32_t);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class LV2Plugin : public ARDOUR::Plugin
|
|||
_instance = NULL;
|
||||
}
|
||||
|
||||
void set_block_size (nframes_t nframes) {}
|
||||
int set_block_size (nframes_t nframes) { return 0; }
|
||||
|
||||
int connect_and_run (std::vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
|
||||
std::string describe_parameter (uint32_t);
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class Plugin : public PBD::StatefulDestructible
|
|||
virtual void activate () = 0;
|
||||
virtual void deactivate () = 0;
|
||||
virtual void flush () { deactivate(); activate(); }
|
||||
virtual void set_block_size (nframes_t nframes) = 0;
|
||||
virtual int set_block_size (nframes_t nframes) = 0;
|
||||
|
||||
virtual int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset) = 0;
|
||||
virtual std::set<uint32_t> automatable() const = 0;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class Redirect : public IO
|
|||
virtual void flush () = 0;
|
||||
virtual nframes_t latency() { return 0; }
|
||||
|
||||
virtual void set_block_size (nframes_t nframes) {}
|
||||
virtual int set_block_size (nframes_t nframes) {return 0; }
|
||||
virtual bool requires_fixed_size_buffers () const { return false; }
|
||||
|
||||
sigc::signal<void,Redirect*,void*> active_changed;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class VSTPlugin : public ARDOUR::Plugin
|
|||
uint32_t nth_parameter (uint32_t port, bool& ok) const;
|
||||
void activate ();
|
||||
void deactivate ();
|
||||
void set_block_size (nframes_t nframes);
|
||||
int set_block_size (nframes_t nframes);
|
||||
int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
|
||||
string describe_parameter (uint32_t);
|
||||
string state_node_name() const { return "vst"; }
|
||||
|
|
|
|||
|
|
@ -839,7 +839,7 @@ AUPlugin::flush ()
|
|||
unit->GlobalReset ();
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
AUPlugin::set_block_size (nframes_t nframes)
|
||||
{
|
||||
bool was_initialized = initialized;
|
||||
|
|
@ -1211,7 +1211,7 @@ AUPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in,
|
|||
AudioTimeStamp ts;
|
||||
OSErr err;
|
||||
|
||||
if (requires_fixed_size_buffers() && (nframes != _current_block_size) {
|
||||
if (requires_fixed_size_buffers() && (nframes != _current_block_size)) {
|
||||
unit->GlobalReset();
|
||||
}
|
||||
|
||||
|
|
@ -1996,7 +1996,8 @@ AUPluginInfo::load (Session& session)
|
|||
|
||||
AUPluginInfo *aup = new AUPluginInfo (*this);
|
||||
plugin->set_info (PluginInfoPtr (aup));
|
||||
plugin->set_fixed_size_buffers (aup->creator() == "!UAD");
|
||||
boost::dynamic_pointer_cast<AUPlugin> (plugin)->set_fixed_size_buffers (aup->creator == "!UAD");
|
||||
return plugin;
|
||||
}
|
||||
|
||||
catch (failed_constructor &err) {
|
||||
|
|
|
|||
|
|
@ -251,12 +251,18 @@ PluginInsert::parameter_changed (uint32_t which, float val)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
PluginInsert::set_block_size (nframes_t nframes)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
for (vector<boost::shared_ptr<Plugin> >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
|
||||
(*i)->set_block_size (nframes);
|
||||
if ((*i)->set_block_size (nframes)) {
|
||||
ret = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -106,13 +106,14 @@ VSTPlugin::~VSTPlugin ()
|
|||
fst_close (_fst);
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
VSTPlugin::set_block_size (nframes_t nframes)
|
||||
{
|
||||
deactivate ();
|
||||
//cerr << "Dispatch effSetBlockSize for " << name() << endl;
|
||||
_plugin->dispatcher (_plugin, effSetBlockSize, 0, nframes, NULL, 0.0f);
|
||||
activate ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
float
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue