hq9000 / cython-vst-loader

a cython-based loader for VST audio plugins proving a clean python object-oriented interface
MIT License
39 stars 2 forks source link

a crash when more than 2 midi events are in the buffer #7

Closed hq9000 closed 3 years ago

hq9000 commented 3 years ago

it looks like something weid happens when we pass more than 1 event to the "process events" callback.

in that situation, it was a note start, note end. when inspecting what actually arrives to the plugin, i saw that the first event was actually the "note off" one (i'd expect it to be note on, as it was put to the list first).

The second element in that array seems to contain some garbage (uninig memory).

This suggest that somewhere in the loader we have some "off by one" error

hq9000 commented 3 years ago

struct VstEvents1024
{
//-------------------------------------------------------------------------------------------------------
    VstInt32 numEvents;     ///< number of Events in array
    VstIntPtr reserved;     ///< zero (Reserved for future use)
    VstEvent* events[1024]; ///< event pointer array, variable size
//-------------------------------------------------------------------------------------------------------
};