aboutsummaryrefslogtreecommitdiff
path: root/core/qmpmidiplay.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-08 23:49:24 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-08 23:49:24 +0800
commit2b46ba471830d4e6e22be5afc720adc2489efcfe (patch)
tree8445440ba0204a67d1cb49185297a49e326dc9ab /core/qmpmidiplay.hpp
parent8f8782f43bd838e825f3792b611d27fffa90399b (diff)
downloadQMidiPlayer-2b46ba471830d4e6e22be5afc720adc2489efcfe.tar.xz
the Awakening of the Evil.
Diffstat (limited to 'core/qmpmidiplay.hpp')
-rw-r--r--core/qmpmidiplay.hpp12
1 files changed, 12 insertions, 0 deletions
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