aboutsummaryrefslogtreecommitdiff
path: root/core/qmpmidiplay.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-25 23:46:17 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-25 23:46:17 +0800
commit4ffde0ad55d041229793ca4457123bcbcbf8e0c0 (patch)
tree9457cee58f3a1f35ebe63de79c6811b1c16e36dc /core/qmpmidiplay.cpp
parent800a0417e9ed175f220c472842a283202c77060b (diff)
downloadQMidiPlayer-4ffde0ad55d041229793ca4457123bcbcbf8e0c0.tar.xz
Plugin API now works correctly. Port old visualization code.
Diffstat (limited to 'core/qmpmidiplay.cpp')
-rw-r--r--core/qmpmidiplay.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp
index 4e28be0..ca2878c 100644
--- a/core/qmpmidiplay.cpp
+++ b/core/qmpmidiplay.cpp
@@ -49,7 +49,7 @@ void CMidiPlayer::fluidDeinitialize()
}
void CMidiPlayer::processEvent(const SEvent *e)
{
- SEventCallBackData cbd(e->type,e->p1,e->p2);
+ SEventCallBackData cbd(e->type,e->p1,e->p2,tceptr);
for(int i=0;i<16;++i)if(eventHandlerCB[i])
eventHandlerCB[i]->callBack(&cbd,eventHandlerCBuserdata[i]);
switch(e->type&0xF0)
@@ -317,9 +317,7 @@ void CMidiPlayer::playerPanic(bool reset)
}
bool CMidiPlayer::playerLoadFile(const char* fn)
{
- midiFile=new CMidiFile(fn);
- memcpy(midiFile->eventReaderCB,this->eventReaderCB,sizeof(this->eventReaderCB));
- memcpy(midiFile->eventReaderCBuserdata,this->eventReaderCBuserdata,sizeof(this->eventReaderCBuserdata));
+ midiFile=new CMidiFile(fn,this->eventReaderCB,this->eventReaderCBuserdata);
if(!midiFile->isValid())return false;
divs=midiFile->getDivision();
fileTimer1Pass();