Fix VST3 processor refcount
This fixes an issue with JUCE plugins remaining alive
after closing the session (and causing issues at exit).
see also 789949ed8e
This commit is contained in:
parent
0aabdc0849
commit
6bcc0163cd
@ -237,8 +237,8 @@ private:
|
|||||||
Linux::IRunLoop* _run_loop;
|
Linux::IRunLoop* _run_loop;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FUnknownPtr<Vst::IAudioProcessor> _processor;
|
IPtr<Vst::IAudioProcessor> _processor;
|
||||||
Vst::ProcessContext _context;
|
Vst::ProcessContext _context;
|
||||||
|
|
||||||
/* Parameters */
|
/* Parameters */
|
||||||
Vst3ParameterChanges _input_param_changes;
|
Vst3ParameterChanges _input_param_changes;
|
||||||
|
@ -1103,7 +1103,7 @@ VST3PI::VST3PI (boost::shared_ptr<ARDOUR::VST3PluginModule> m, std::string uniqu
|
|||||||
throw failed_constructor ();
|
throw failed_constructor ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(_processor = FUnknownPtr<Vst::IAudioProcessor> (_component).take ())) {
|
if (!(_processor = FUnknownPtr<Vst::IAudioProcessor> (_component))) {
|
||||||
_controller->terminate ();
|
_controller->terminate ();
|
||||||
_controller->release ();
|
_controller->release ();
|
||||||
_component->terminate ();
|
_component->terminate ();
|
||||||
@ -1111,8 +1111,6 @@ VST3PI::VST3PI (boost::shared_ptr<ARDOUR::VST3PluginModule> m, std::string uniqu
|
|||||||
throw failed_constructor ();
|
throw failed_constructor ();
|
||||||
}
|
}
|
||||||
|
|
||||||
_processor->addRef ();
|
|
||||||
|
|
||||||
/* prepare process context */
|
/* prepare process context */
|
||||||
memset (&_context, 0, sizeof (Vst::ProcessContext));
|
memset (&_context, 0, sizeof (Vst::ProcessContext));
|
||||||
|
|
||||||
@ -1242,7 +1240,6 @@ VST3PI::terminate ()
|
|||||||
|
|
||||||
deactivate ();
|
deactivate ();
|
||||||
|
|
||||||
_processor->release ();
|
|
||||||
_processor = 0;
|
_processor = 0;
|
||||||
|
|
||||||
disconnect_components ();
|
disconnect_components ();
|
||||||
|
Loading…
Reference in New Issue
Block a user