diff options
author | Chris Xiong <chirs241097@gmail.com> | 2017-02-10 23:56:09 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2017-02-10 23:56:09 +0800 |
commit | acf466561f17bf0eb6c19ea0467b27f5392aeb36 (patch) | |
tree | e2a2eb7c87e99a47d2536c10abcee6e3b50cdded /midifmt-plugin/midifmtplugin.cpp | |
parent | 70f0007154992c0bc89e11af4fe7dcc2c493aac3 (diff) | |
download | QMidiPlayer-acf466561f17bf0eb6c19ea0467b27f5392aeb36.tar.xz |
Road to standardize: use two parameters for pitchbend.
Documentation.
Minor bug fix.
Diffstat (limited to 'midifmt-plugin/midifmtplugin.cpp')
-rw-r--r-- | midifmt-plugin/midifmtplugin.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/midifmt-plugin/midifmtplugin.cpp b/midifmt-plugin/midifmtplugin.cpp index 33e636e..0a0c75d 100644 --- a/midifmt-plugin/midifmtplugin.cpp +++ b/midifmt-plugin/midifmtplugin.cpp @@ -32,7 +32,7 @@ bool CMidiStreamReader::midsBodyReader() readDWLE();//size uint32_t cblocks=readDWLE(); uint32_t curid=0,cts=0; - for(int i=0;i<cblocks;++i) + for(uint32_t i=0;i<cblocks;++i) { readDWLE(); uint32_t blocksz=readDWLE(),cpos=ftell(f); @@ -50,8 +50,6 @@ bool CMidiStreamReader::midsBodyReader() //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; - if((ev.type&0xF0)==0xE0)//pitch wheel - {ev.p1=(ev.p1|(ev.p2<<7))&0x3FFF;ev.p2=0;} ret->eventList.push_back(ev);eventdiscarded=0; qmpMidiFmtPlugin::api->callEventReaderCB(SEventCallBackData(ev.type,ev.p1,ev.p2,ev.time)); if(eventdiscarded)ret->eventList.pop_back(); |