aboutsummaryrefslogtreecommitdiff
path: root/midifmt-plugin
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-10 23:56:09 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-10 23:56:09 +0800
commitacf466561f17bf0eb6c19ea0467b27f5392aeb36 (patch)
treee2a2eb7c87e99a47d2536c10abcee6e3b50cdded /midifmt-plugin
parent70f0007154992c0bc89e11af4fe7dcc2c493aac3 (diff)
downloadQMidiPlayer-acf466561f17bf0eb6c19ea0467b27f5392aeb36.tar.xz
Road to standardize: use two parameters for pitchbend.
Documentation. Minor bug fix.
Diffstat (limited to 'midifmt-plugin')
-rw-r--r--midifmt-plugin/midifmtplugin.cpp4
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();