Fix GUI context state loading in standalones
This commit is contained in:
parent
910a90d47a
commit
cf72a796f4
1 changed files with 13 additions and 3 deletions
|
@ -456,9 +456,19 @@ impl<P: Plugin, B: Backend> Wrapper<P, B> {
|
||||||
|
|
||||||
self.notify_param_values_changed();
|
self.notify_param_values_changed();
|
||||||
|
|
||||||
// TODO: Normally we'd also call initialize after deserializing state, but
|
// FIXME: This is obviously not realtime safe, but loading presets without
|
||||||
// that's not guaranteed to be realtime safe. Should we do it anyways?
|
// doing this could lead to inconsistencies. It's the plugin's
|
||||||
self.plugin.write().reset();
|
// responsibility to not perform any realtime-unsafe work when the
|
||||||
|
// initialize function is called a second time if it supports
|
||||||
|
// runtime preset loading.
|
||||||
|
permit_alloc(|| {
|
||||||
|
plugin.initialize(
|
||||||
|
&self.bus_config,
|
||||||
|
&self.buffer_config,
|
||||||
|
&mut self.make_init_context(),
|
||||||
|
)
|
||||||
|
});
|
||||||
|
plugin.reset();
|
||||||
|
|
||||||
// We'll pass the state object back to the GUI thread so deallocation can
|
// We'll pass the state object back to the GUI thread so deallocation can
|
||||||
// happen there without potentially blocking the audio thread
|
// happen there without potentially blocking the audio thread
|
||||||
|
|
Loading…
Add table
Reference in a new issue