class Plugin;
class PluginInfo;
class AutomationControl;
+class SessionObject;
typedef boost::shared_ptr<Plugin> PluginPtr;
typedef boost::shared_ptr<PluginInfo> PluginInfoPtr;
PluginInfoPtr get_info() const { return _info; }
virtual void set_info (const PluginInfoPtr inf);
+ virtual void set_owner (SessionObject* o) { _owner = o; }
+ SessionObject* owner() const { return _owner; }
+
ARDOUR::AudioEngine& engine() const { return _engine; }
ARDOUR::Session& session() const { return _session; }
uint32_t _cycles;
std::map<std::string, PresetRecord> _presets;
+ SessionObject* _owner;
+
private:
/** Fill _presets with our presets */
XMLNode& get_state(void);
int set_state(const XMLNode&, int version);
void update_id (PBD::ID);
+ void set_owner (SessionObject*);
void set_state_dir (const std::string& d = "");
void run (BufferSet& in, framepos_t start_frame, framepos_t end_frame, double speed, pframes_t nframes, bool);
PluginPinWindowProxy * pinmgr_proxy () const { return _pinmgr_proxy; }
void set_pingmgr_proxy (PluginPinWindowProxy* wp) { _pinmgr_proxy = wp ; }
- void set_owner (SessionObject*);
+ virtual void set_owner (SessionObject*);
SessionObject* owner() const;
protected:
}
}
+void
+PluginInsert::set_owner (SessionObject* o)
+{
+ Processor::set_owner (o);
+ for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) {
+ (*i)->set_owner (o);
+ }
+}
+
void
PluginInsert::set_state_dir (const std::string& d)
{
PluginInsert::add_plugin (boost::shared_ptr<Plugin> plugin)
{
plugin->set_insert_id (this->id());
+ plugin->set_owner (_owner);
if (_plugins.empty()) {
/* first (and probably only) plugin instance - connect to relevant signals */