diff options
author | Chris Xiong <chirs241097@gmail.com> | 2019-11-11 23:38:09 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2019-11-11 23:38:09 +0800 |
commit | b4c4cefb706f9c43a54fecb18cb8ee50f0f0e19a (patch) | |
tree | c62673b5462240cacb8cbd144a654e811ba7bceb /core/qmpmidiread.cpp | |
parent | 9f139f5807c3c18a77ebaa8e646355c19dca5ca9 (diff) | |
download | QMidiPlayer-b4c4cefb706f9c43a54fecb18cb8ee50f0f0e19a.tar.xz |
New UI hook "main.seek". Fix SysExc. message sending. API documentation update.
Simple visualization no longer have notes stuck after seeking.
System exclusive messages longer than 256 bytes are now sent correctly.
Diffstat (limited to 'core/qmpmidiread.cpp')
-rw-r--r-- | core/qmpmidiread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/qmpmidiread.cpp b/core/qmpmidiread.cpp index 48a149d..697a5bd 100644 --- a/core/qmpmidiread.cpp +++ b/core/qmpmidiread.cpp @@ -147,7 +147,7 @@ int CSMFReader::read_event()//returns 0 if End of Track encountered str=new char[len+8]; if((type&0x0F)==0x00) { - str[0]=0xF0;++len; + str[0]=char(0xF0);++len; size_t sz=fread(str+1,1,len-1,f); if(sz<len-1)error(1,"Unexpected EOF"); } @@ -156,7 +156,7 @@ int CSMFReader::read_event()//returns 0 if End of Track encountered size_t sz=fread(str,1,len,f); if(sz<len)error(1,"Unexpected EOF"); } - curTrack->appendEvent(SEvent(curid,curt,type,len,0,str)); + curTrack->appendEvent(SEvent(curid,curt,type,0,0,std::string(str,len))); if(!strcmp(str,GM1SysX))ret->std=1; if(!strcmp(str,GM2SysX))ret->std=2; if(!strcmp(str,GSSysEx))ret->std=3; |