Calling MIDI_GetAllEvts with a buffer size that is too small will corrupt the take, so next time the playhead reaches it the audio engine will deadlock.
Version: 6.29 dev0613a (but probably existed before)
Code:
Code:
int bufSize = 1024;
std::vector<char> eventbuffer(bufSize);
auto take = ::GetActiveTake(::GetSelectedMediaItem(0, 0));
bool succ = MIDI_GetAllEvts(take, eventbuffer.data(), &bufSize);
I assumed that MIDI_GetAllEvts would return a cropped version of the buffer, and I could grow my vector recursively until I grabbed all the events.
All it takes is one call to MIDI_GetAllEvts with a smaller bufSize to corrupt playback of the take.