Always request flush when setting params from GUI
This commit is contained in:
parent
285f831e77
commit
a291e0dfb6
|
@ -645,11 +645,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
/// host (it will still be set on the plugin either way).
|
/// host (it will still be set on the plugin either way).
|
||||||
pub fn queue_parameter_event(&self, event: OutputParamEvent) -> bool {
|
pub fn queue_parameter_event(&self, event: OutputParamEvent) -> bool {
|
||||||
let result = self.output_parameter_events.push(event).is_ok();
|
let result = self.output_parameter_events.push(event).is_ok();
|
||||||
|
|
||||||
|
// Requesting a flush is fine even during audio processing. This avoids a race condition.
|
||||||
match &*self.host_params.borrow() {
|
match &*self.host_params.borrow() {
|
||||||
Some(host_params) if !self.is_processing.load(Ordering::SeqCst) => {
|
Some(host_params) => unsafe { (host_params.request_flush)(&*self.host_callback) },
|
||||||
unsafe { (host_params.request_flush)(&*self.host_callback) };
|
|
||||||
}
|
|
||||||
Some(_) => (),
|
|
||||||
None => nih_debug_assert_failure!("The host does not support parameters? What?"),
|
None => nih_debug_assert_failure!("The host does not support parameters? What?"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue