From 2b46ba471830d4e6e22be5afc720adc2489efcfe Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Fri, 8 Apr 2016 23:49:24 +0800 Subject: the Awakening of the Evil. --- core/qmpmidiplay.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/qmpmidiplay.hpp') diff --git a/core/qmpmidiplay.hpp b/core/qmpmidiplay.hpp index a7e7f88..4592ea0 100644 --- a/core/qmpmidiplay.hpp +++ b/core/qmpmidiplay.hpp @@ -19,6 +19,13 @@ struct SEvent if(s){str=new char[strlen(s)+2];strcpy(str,s);}else str=NULL; } }; +class CMidiCallBack +{ + public: + CMidiCallBack(){} + virtual void callBack(void* data)=0; + virtual ~CMidiCallBack(){} +}; class CMidiFile { private: @@ -72,6 +79,9 @@ class CMidiPlayer uint32_t finished,resumed; qmpMidiMapperRtMidi *mapper; int mappedoutput[16],deviceusage[16],deviceiid[128]; + uint8_t chstate[16]; + CMidiCallBack *noteOnCB; + void* noteOnCBUserData; void setBit(uint16_t &n,uint16_t bn,uint16_t b); void processEvent(const SEvent *e); @@ -139,5 +149,7 @@ class CMidiPlayer qmpMidiMapperRtMidi* getMidiMapper(); void setChannelOutput(int ch,int devid); + uint8_t* getChstates(); + void setNoteOnCallBack(CMidiCallBack *cb,void *userdata); }; #endif -- cgit v1.2.3