Skip to content

Commit

Permalink
fix: Events.numEvents should be int32_t, not int64_t (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsariola committed Jul 18, 2023
1 parent 08ee2a4 commit 9b214b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func (e *EventsPtr) Event(i int) Event {
eventType
}
ev := (*event)(C.getEvent((*C.Events)(e), C.int32_t(i)))
if ev == nil {
return nil
}
switch ev.eventType {
case MIDI:
return (*MIDIEvent)(unsafe.Pointer(ev))
Expand Down
4 changes: 2 additions & 2 deletions include/vst.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ typedef CPlugin* (*EntryPoint)(HostCallback host);
struct Events
{
// Number of Events in array.
int64_t numEvents;
int32_t numEvents;
// Not used.
int64_t reserved;
void* reserved;
// Event pointer array, variable size.
void* events[];
};
Expand Down

0 comments on commit 9b214b1

Please sign in to comment.