Skip to content

Commit

Permalink
clap: check space_id of events
Browse files Browse the repository at this point in the history
  • Loading branch information
micahrj committed Oct 26, 2023
1 parent cb149d5 commit e9e677f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/format/clap/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ impl<P: Plugin> Instance<P> {
for i in 0..size {
let event = (*in_events).get.unwrap()(in_events, i);

if (*event).type_ == CLAP_EVENT_PARAM_VALUE {
if (*event).space_id == CLAP_CORE_EVENT_SPACE_ID
&& (*event).type_ == CLAP_EVENT_PARAM_VALUE
{
let event = &*(event as *const clap_event_param_value);

if let Some(&param_index) = instance.param_map.get(&event.param_id) {
Expand Down Expand Up @@ -593,7 +595,9 @@ impl<P: Plugin> Instance<P> {
for i in 0..size {
let event = (*in_).get.unwrap()(in_, i);

if (*event).type_ == CLAP_EVENT_PARAM_VALUE {
if (*event).space_id == CLAP_CORE_EVENT_SPACE_ID
&& (*event).type_ == CLAP_EVENT_PARAM_VALUE
{
let event = &*(event as *const clap_event_param_value);

if let Some(&param_index) = instance.param_map.get(&event.param_id) {
Expand All @@ -613,7 +617,9 @@ impl<P: Plugin> Instance<P> {
for i in 0..size {
let event = (*in_).get.unwrap()(in_, i);

if (*event).type_ == CLAP_EVENT_PARAM_VALUE {
if (*event).space_id == CLAP_CORE_EVENT_SPACE_ID
&& (*event).type_ == CLAP_EVENT_PARAM_VALUE
{
let event = &*(event as *const clap_event_param_value);

if let Some(&param_index) = instance.param_map.get(&event.param_id) {
Expand Down

0 comments on commit e9e677f

Please sign in to comment.