diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-01-16 16:46:27 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-01-16 16:46:27 +0800 |
commit | ebda8030fdb70a8162c67947dd980b59337f2d05 (patch) | |
tree | 3ef4b43e8ca4f58788888e18d9feaa4cf74f5107 /qmpmidiplay.cpp | |
parent | e3a5241953051e97978ac42fa278572ae735abb3 (diff) | |
download | QMidiPlayer-ebda8030fdb70a8162c67947dd980b59337f2d05.tar.xz |
Peaceful Romancer. (WTF)0.6.2-2
Diffstat (limited to 'qmpmidiplay.cpp')
-rw-r--r-- | qmpmidiplay.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/qmpmidiplay.cpp b/qmpmidiplay.cpp index 5bce475..d099384 100644 --- a/qmpmidiplay.cpp +++ b/qmpmidiplay.cpp @@ -10,6 +10,15 @@ void CMidiPlayer::fluidInitialize() fluid_synth_set_chorus(synth,FLUID_CHORUS_DEFAULT_N,FLUID_CHORUS_DEFAULT_LEVEL, FLUID_CHORUS_DEFAULT_SPEED,FLUID_CHORUS_DEFAULT_DEPTH, FLUID_CHORUS_DEFAULT_TYPE); + if(midiFile->getStandard()==4) + fluid_synth_set_channel_type(synth,9,CHANNEL_TYPE_MELODIC); + else if(midiFile->getStandard()==1) + fluid_synth_set_channel_type(synth,9,CHANNEL_TYPE_DRUM); + else + { + fluid_synth_set_channel_type(synth,9,CHANNEL_TYPE_DRUM); + fluid_synth_bank_select(synth,9,128); + } } void CMidiPlayer::fluidDeinitialize() { @@ -147,7 +156,7 @@ void CMidiPlayer::fileTimer2Pass() ccc[i][76]=64;ccc[i][77]=64;ccc[i][78]=64; ccc[0][131]=dpt;ccc[0][132]=0x04021808; ccc[0][133]=0; - } + }if(midiFile->getStandard()!=4)ccc[9][0]=128; for(int i=0;i<16;++i)for(int j=0;j<134;++j) ccstamps[0][i][j]=ccc[i][j]; for(uint32_t eptr=0,ct=midiFile->getEvent(0)->time;eptr<midiFile->getEventCount();) |