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 --- include/adlmidi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/adlmidi.h') diff --git a/include/adlmidi.h b/include/adlmidi.h index 1a613cf..6a5a21a 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -214,7 +214,7 @@ extern double adl_tickEvents(ADL_MIDIPlayer *device, double seconds, double gran /**Hooks**/ -typedef void (*ADL_RawEventHook)(void *userdata, ADL_UInt8 type, ADL_UInt8 subtype, ADL_UInt8 channel, ADL_UInt8 *data, size_t len); +typedef void (*ADL_RawEventHook)(void *userdata, ADL_UInt8 type, ADL_UInt8 subtype, ADL_UInt8 channel, const ADL_UInt8 *data, size_t len); typedef void (*ADL_NoteHook)(void *userdata, int adlchn, int note, int ins, int pressure, double bend); typedef void (*ADL_DebugMessageHook)(void *userdata, const char *fmt, ...); -- cgit v1.2.3