13
0

VST3: set owner (prepare for context-info extensions)

This commit is contained in:
Robin Gareus 2020-10-06 21:11:56 +02:00
parent c4bc3b00d2
commit bbbd6a36ec
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 20 additions and 0 deletions

View File

@ -148,6 +148,8 @@ public:
Vst::ProcessContext& context () { return _context; }
void set_owner (ARDOUR::SessionObject* o);
void enable_io (std::vector<bool> const&, std::vector<bool> const&);
void process (float** ins, float** outs, uint32_t n_samples);
@ -233,6 +235,8 @@ private:
boost::optional<uint32_t> _plugin_latency;
ARDOUR::SessionObject* _owner;
int _n_inputs;
int _n_outputs;
int _n_aux_inputs;
@ -292,6 +296,8 @@ public:
int set_block_size (pframes_t);
void set_owner (ARDOUR::SessionObject* o);
int connect_and_run (BufferSet& bufs,
samplepos_t start, samplepos_t end, double speed,
ChanMapping const& in, ChanMapping const& out,

View File

@ -516,6 +516,13 @@ VST3Plugin::set_state (const XMLNode& node, int version)
/* ****************************************************************************/
void
VST3Plugin::set_owner (ARDOUR::SessionObject* o)
{
Plugin::set_owner (o);
_plug->set_owner (o);
}
int
VST3Plugin::set_block_size (pframes_t n_samples)
{
@ -943,6 +950,7 @@ VST3PI::VST3PI (boost::shared_ptr<ARDOUR::VST3PluginModule> m, std::string uniqu
, _is_processing (false)
, _block_size (0)
, _port_id_bypass (UINT32_MAX)
, _owner (0)
, _n_factory_presets (0)
{
using namespace std;
@ -1450,6 +1458,12 @@ VST3PI::plugin_latency ()
return _plugin_latency.value ();
}
void
VST3PI::set_owner (SessionObject* o)
{
_owner = o;
}
int32
VST3PI::count_channels (Vst::MediaType media, Vst::BusDirection dir, Vst::BusType type)
{