diff options
author | Chris Xiong <chirs241097@gmail.com> | 2019-03-18 10:32:30 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2019-03-18 10:32:30 +0800 |
commit | d2b00a80c237c1c3d8bc9551966cf781292525e6 (patch) | |
tree | 6434e0b6a220c2355f7bf06124dda5a579be2ccc /core/qmpmidioutfluid.cpp | |
parent | cf15fde2aa2bcbb244fdfdc46debf457451079f7 (diff) | |
download | QMidiPlayer-d2b00a80c237c1c3d8bc9551966cf781292525e6.tar.xz |
Fixed initial preset selection in XG mode.
Diffstat (limited to 'core/qmpmidioutfluid.cpp')
-rw-r--r-- | core/qmpmidioutfluid.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/core/qmpmidioutfluid.cpp b/core/qmpmidioutfluid.cpp index 8055421..ab0ab9d 100644 --- a/core/qmpmidioutfluid.cpp +++ b/core/qmpmidioutfluid.cpp @@ -30,15 +30,6 @@ void qmpMidiOutFluid::deviceInit() } fluid_synth_set_chorus(synth,3,2.0,0.3,8.0, FLUID_CHORUS_MOD_SINE); - /*if(midiFile->std==4) - fluid_synth_set_channel_type(synth,9,CHANNEL_TYPE_MELODIC); - else if(midiFile->std==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 qmpMidiOutFluid::deviceDeinit(){deviceDeinit(false);} void qmpMidiOutFluid::deviceDeinit(bool freshsettings) @@ -108,12 +99,16 @@ void qmpMidiOutFluid::panic(uint8_t ch) void qmpMidiOutFluid::reset(uint8_t ch) { this->panic(ch); - fluid_synth_cc(synth,ch,0,0); + for(int i=0;i<128;++i) + fluid_synth_cc(synth,ch,i,0); + if(ch==9) + fluid_synth_cc(synth,ch,0,127); + else + fluid_synth_cc(synth,ch,0,0); fluid_synth_cc(synth,ch,7,100); fluid_synth_cc(synth,ch,8,64); fluid_synth_cc(synth,ch,10,64); fluid_synth_cc(synth,ch,11,127); - fluid_synth_cc(synth,ch,32,0); fluid_synth_pitch_wheel_sens(synth,ch,2); } void qmpMidiOutFluid::onMapped(uint8_t,int) |