aboutsummaryrefslogtreecommitdiff
path: root/core/qmpmidiplay.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-12 23:37:24 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-12 23:37:24 +0800
commit43ae9bb08b7f3f18028fa8663a6077f4ae1ccbca (patch)
treeb957cdb79e2af63fd7222c63b9a79e307de4834f /core/qmpmidiplay.cpp
parentcd09a7e8a42c8f3617cfe3c57eed3b96bcfd2ec5 (diff)
downloadQMidiPlayer-43ae9bb08b7f3f18028fa8663a6077f4ae1ccbca.tar.xz
Mysterious Mountain. (Partially fixed #2)
Diffstat (limited to 'core/qmpmidiplay.cpp')
-rw-r--r--core/qmpmidiplay.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp
index 6b0c16f..6af7722 100644
--- a/core/qmpmidiplay.cpp
+++ b/core/qmpmidiplay.cpp
@@ -264,6 +264,12 @@ CMidiPlayer::CMidiPlayer(bool singleInst)
memset(mappedoutput,0,sizeof(mappedoutput));
memset(deviceusage,0,sizeof(deviceusage));
mapper=new qmpMidiMapperRtMidi();
+ memset(chstatus,0,sizeof(chstatus));
+ for(int i=0;i<16;++i)
+ chstatus[i][7]=100,chstatus[i][11]=127,
+ chstatus[i][10]=chstatus[i][71]=chstatus[i][72]=
+ chstatus[i][73]=chstatus[i][74]=chstatus[i][75]=
+ chstatus[i][76]=chstatus[i][77]=chstatus[i][78]=64;
#ifdef _WIN32
QueryPerformanceFrequency((LARGE_INTEGER*)&pf);
#endif
@@ -435,6 +441,7 @@ int CMidiPlayer::getCC(int ch,int id)
void CMidiPlayer::setCC(int ch,int id,int val)
{
if(!synth)return;
+ chstatus[ch][id]=val;
mappedoutput[ch]?mapper->ctrlChange(mappedoutput[ch]-1,ch,id,val):
(void)fluid_synth_cc(synth,ch,id,val);
}