![]() |
#1 |
Human being with feelings
Join Date: Oct 2018
Posts: 39
|
![]()
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. Last edited by lexomir; 06-13-2021 at 10:09 PM. |
![]() |
![]() |
![]() |
#2 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,223
|
![]()
Thanks, fixing!
|
![]() |
![]() |
![]() |
Thread Tools | |
|
|