aboutsummaryrefslogtreecommitdiff
path: root/core/qmpmidiplay.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-18 23:34:22 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-18 23:34:22 +0800
commit41d78f3a67e2356008911b07f8cc0d0cdafd7fda (patch)
treef9ab616fb25b718b4299b15b90e54c86cb131161 /core/qmpmidiplay.hpp
parentb21f97f416cea5d9d86e3b28bd797b42491fc5a9 (diff)
downloadQMidiPlayer-41d78f3a67e2356008911b07f8cc0d0cdafd7fda.tar.xz
Use std::vector for the event list. Add panic action.
Minor changes on the panic function.
Diffstat (limited to 'core/qmpmidiplay.hpp')
-rw-r--r--core/qmpmidiplay.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/qmpmidiplay.hpp b/core/qmpmidiplay.hpp
index b0fb387..f2d7a4a 100644
--- a/core/qmpmidiplay.hpp
+++ b/core/qmpmidiplay.hpp
@@ -4,6 +4,7 @@
#include <cstring>
#include <cstdint>
#include <cstdlib>
+#include <vector>
#include <fluidsynth.h>
#include "qmpmidimappers.hpp"
struct SEvent
@@ -29,9 +30,9 @@ class CMidiCallBack
class CMidiFile
{
private:
- SEvent *eventList[10000000];
+ std::vector<SEvent*>eventList;
char *title,*copyright;
- uint32_t eventc,std;//standard 0=? 1=GM 2=GM2 3=GS 4=XG
+ uint32_t std;//standard 0=? 1=GM 2=GM2 3=GS 4=XG
uint32_t fmt,trk,divs;
FILE *f;
int byteread,valid;