diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-04-23 23:50:31 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-04-23 23:50:31 +0800 |
commit | aa8af83ff8889aa136e9152b2cca9a88d99c5f47 (patch) | |
tree | 54af0c407c08d86c1fbf5e5856ee66c4f80e1b0b /core/qmpmidiplay.cpp | |
parent | 446263beafeafa831530a6f9711aa891955b7db3 (diff) | |
download | QMidiPlayer-aa8af83ff8889aa136e9152b2cca9a88d99c5f47.tar.xz |
Add stubs for plugin support.
Diffstat (limited to 'core/qmpmidiplay.cpp')
-rw-r--r-- | core/qmpmidiplay.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp index e33f804..cbed018 100644 --- a/core/qmpmidiplay.cpp +++ b/core/qmpmidiplay.cpp @@ -49,6 +49,7 @@ void CMidiPlayer::fluidDeinitialize() } void CMidiPlayer::processEvent(const SEvent *e) { + SEventCallBackData cbd(e->type,e->p1,e->p2); switch(e->type&0xF0) { case 0x80://Note off @@ -60,7 +61,7 @@ void CMidiPlayer::processEvent(const SEvent *e) case 0x90://Note on if((mute>>(e->type&0x0F))&1)break;//muted if(solo&&!((solo>>(e->type&0x0F))&1))break; - if(noteOnCB)noteOnCB->callBack(noteOnCBUserData); + if(noteOnCB)noteOnCB->callBack(&cbd,noteOnCBUserData); if(mappedoutput[e->type&0x0F]) mapper->noteOn(mappedoutput[e->type&0x0F]-1,e->type&0x0F,e->p1,e->p2); else @@ -397,6 +398,7 @@ uint32_t CMidiPlayer::getFileStandard(){return midiFile?midiFile->getStandard(): const char* CMidiPlayer::getTitle(){return midiFile?midiFile->getTitle():"";} const char* CMidiPlayer::getCopyright(){return midiFile?midiFile->getCopyright():"";} double CMidiPlayer::getTempo(){return 60./(ctempo/1e6);} +uint32_t CMidiPlayer::getDivision(){return divs;} uint32_t CMidiPlayer::getTCpaused(){return tcpaused;} void CMidiPlayer::setTCpaused(uint32_t ps){tcpaused=ps;} uint32_t CMidiPlayer::isFinished(){return finished;} @@ -528,5 +530,5 @@ void CMidiPlayer::setChannelOutput(int ch,int devid) }else fluid_synth_all_notes_off(synth,ch); } uint8_t* CMidiPlayer::getChstates(){return chstate;} -void CMidiPlayer::setNoteOnCallBack(CMidiCallBack *cb,void *userdata) +void CMidiPlayer::setNoteOnCallBack(IMidiCallBack *cb,void *userdata) {noteOnCB=cb;noteOnCBUserData=userdata;} |