From 0be25a41ca793c3c03814f529890492adfac8ad5 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Thu, 9 Nov 2017 22:50:32 +0300 Subject: Resolve weird crash caused by Tetris inside ADLMIDI2 and other changes - Move most of inline classes methods into own CC file - Move Input into own header with own CC file to share it with the puzzle game - Created virtual destructors and resolved weak vtable trouble between of Tetris's classes - Remove static declarisons of Tetris class. Instead, let it be member of UserInterface - Fixed forgot note-offs while sorting events row with zero length notes - Fixed crash caused by unsafe access by reference to element of array that was modified/reallocated one or multiple times - Stabilize dealing with zero-length notes --- src/adlmidi_private.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/adlmidi_private.hpp') diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index 37e0d25..58b4e10 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -257,7 +257,7 @@ struct MIDIEventHooks onDebugMessage_userData(NULL) {} //! Raw MIDI event hook - typedef void (*RawEventHook)(void *userdata, uint8_t type, uint8_t subtype, uint8_t channel, uint8_t *data, size_t len); + typedef void (*RawEventHook)(void *userdata, uint8_t type, uint8_t subtype, uint8_t channel, const uint8_t *data, size_t len); RawEventHook onEvent; void *onEvent_userData; @@ -886,7 +886,7 @@ private: bool ProcessEvents(); bool ProcessEventsNew(bool isSeek = false); void HandleEvent(size_t tk); - void HandleEvent(size_t tk, MidiEvent &evt, int &status); + void HandleEvent(size_t tk, const MidiEvent &evt, int &status); // Determine how good a candidate this adlchannel // would be for playing a note from this instrument. -- cgit v1.2.3