free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.77k stars 100 forks source link

inconsistent types for clap_event_type #93

Closed BillyDM closed 2 years ago

BillyDM commented 2 years ago

In the file

https://github.com/free-audio/clap/blob/main/include/clap/events.h

the line here says that clap_event_type is of type int32_t (line 117)

typedef int32_t clap_event_type;

but the clap_event_header struct that uses it says the type is uint16_t (line 17)

typedef struct clap_event_header {
   uint32_t size;     // event size including this header, eg: sizeof (clap_event_note)
   uint32_t time;     // sample offset within the buffer for this event
   uint16_t space_id; // event space, see clap_host_event_registry
   uint16_t type;     // event type
   uint32_t flags;    // see clap_event_flags
} clap_event_header_t;
abique commented 2 years ago

Good catch! Hopefully, clap_event_type is never used. I'm going to kill that one now.