aboutsummaryrefslogtreecommitdiff
path: root/midifmt-plugin
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-06-22 11:26:48 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2017-06-22 11:26:48 +0800
commitb03133b80b268c74d1dd5c92e2af6907b51c91b2 (patch)
tree2700bf29cecd5ae89fd7d99e3d6acb88ebb44e61 /midifmt-plugin
parenta97307ba6e625468a1d8ad1049e6d9db0ad42d4d (diff)
downloadQMidiPlayer-b03133b80b268c74d1dd5c92e2af6907b51c91b2.tar.xz
Minor bug fixes.
SMF reader finally takes chunk length into account. Do not prepend sysex header to F0h sysex. Let the readers do it. File readers code cleanups and refined error messages.
Diffstat (limited to 'midifmt-plugin')
-rw-r--r--midifmt-plugin/midifmtplugin.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/midifmt-plugin/midifmtplugin.cpp b/midifmt-plugin/midifmtplugin.cpp
index 05b5b87..a025d29 100644
--- a/midifmt-plugin/midifmtplugin.cpp
+++ b/midifmt-plugin/midifmtplugin.cpp
@@ -47,9 +47,6 @@ bool CMidiStreamReader::midsBodyReader()
else if(e>>24==0)//midishortmsg
ev=SEvent(curid,cts,e&0xFF,(e>>8)&0xFF,(e>>16)&0xFF);
else return false;
- //fprintf(stderr,"ev: @ %x t %x p1 %x p2 %x\n",ev.time,ev.type,ev.p1,ev.p2);
- if((ev.type&0xF0)==0x90&&ev.p2==0)//Note on with zero velo
- ev.type=(ev.type&0x0F)|0x80;
ret->tracks.back().appendEvent(ev);eventdiscarded=0;
qmpMidiFmtPlugin::api->callEventReaderCB(SEventCallBackData(ev.type,ev.p1,ev.p2,ev.time));
if(eventdiscarded)ret->tracks.back().eventList.pop_back();
@@ -70,7 +67,7 @@ CMidiFile* CMidiStreamReader::readFile(const char *fn)
if(!midsBodyReader())throw std::runtime_error("MIDS data error");
}catch(std::runtime_error& e)
{
- fprintf(stderr,"MIDI Format plugin: E: %s is not a supported file. Cause: %s.\n",fn,e.what());
+ fprintf(stderr,"CMidiStreamReader E: %s is not a supported file. Cause: %s.\n",fn,e.what());
ret->valid=0;if(f)fclose(f);f=NULL;
}
return ret;