diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-04-12 23:37:24 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-04-12 23:37:24 +0800 |
commit | 43ae9bb08b7f3f18028fa8663a6077f4ae1ccbca (patch) | |
tree | b957cdb79e2af63fd7222c63b9a79e307de4834f /core | |
parent | cd09a7e8a42c8f3617cfe3c57eed3b96bcfd2ec5 (diff) | |
download | QMidiPlayer-43ae9bb08b7f3f18028fa8663a6077f4ae1ccbca.tar.xz |
Mysterious Mountain. (Partially fixed #2)
Diffstat (limited to 'core')
-rw-r--r-- | core/qmpmidimapperrtmidi.cpp | 1 | ||||
-rw-r--r-- | core/qmpmidiplay.cpp | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/core/qmpmidimapperrtmidi.cpp b/core/qmpmidimapperrtmidi.cpp index 7d6cdac..f28bb9d 100644 --- a/core/qmpmidimapperrtmidi.cpp +++ b/core/qmpmidimapperrtmidi.cpp @@ -19,7 +19,6 @@ int qmpMidiMapperRtMidi::enumDevices() } std::string qmpMidiMapperRtMidi::deviceName(int id) { - fprintf(stderr,"port #%d: %s\n",id,dummy->getPortName(id).c_str()); return dummy->getPortName(id); } int qmpMidiMapperRtMidi::deviceInit(int id) 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); } |