Also move reset() call to process start for CLAP
So the behavior is consistent for CLAP and VST3.
This commit is contained in:
parent
4ac0c40812
commit
4779991edf
|
@ -1478,8 +1478,8 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
&buffer_config,
|
&buffer_config,
|
||||||
&mut wrapper.make_process_context(Transport::new(buffer_config.sample_rate)),
|
&mut wrapper.make_process_context(Transport::new(buffer_config.sample_rate)),
|
||||||
) {
|
) {
|
||||||
// As per-the trait docs we'll always call this after the initialization function
|
// NOTE: `Plugin::reset()` is called in `clap_plugin::start_processing()` instead of in
|
||||||
process_wrapper(|| plugin.reset());
|
// this function
|
||||||
|
|
||||||
// Preallocate enough room in the output slices vector so we can convert a `*mut *mut
|
// Preallocate enough room in the output slices vector so we can convert a `*mut *mut
|
||||||
// f32` to a `&mut [&mut f32]` in the process call
|
// f32` to a `&mut [&mut f32]` in the process call
|
||||||
|
@ -1513,6 +1513,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
wrapper.last_process_status.store(ProcessStatus::Normal);
|
wrapper.last_process_status.store(ProcessStatus::Normal);
|
||||||
wrapper.is_processing.store(true, Ordering::SeqCst);
|
wrapper.is_processing.store(true, Ordering::SeqCst);
|
||||||
|
|
||||||
|
// To be consistent with the VST3 wrapper, we'll also reset the buffers here in addition to
|
||||||
|
// the dedicated `reset()` function.
|
||||||
|
process_wrapper(|| wrapper.plugin.write().reset());
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue