RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 1.12
diff -u -r1.12 imuse.cpp
|
|
|
3104 | 3106 | |
3105 | 3107 | void Part::set_detune(int8 detune) |
3106 | 3108 | { |
3107 | | _detune_eff = clamp((_detune = detune) + _player->_detune, -128, 127); |
| 3109 | _detune_eff = clamp((_detune = detune) + (_player ? _player->_detune : 0), -128, 127); |
3108 | 3110 | changed(IMuseDriver::pcMod); |
3109 | 3111 | } |
3110 | 3112 | |
… |
… |
|
3116 | 3118 | |
3117 | 3119 | void Part::set_vol(uint8 vol) |
3118 | 3120 | { |
3119 | | _vol_eff = ((_vol = vol) + 1) * _player->_vol_eff >> 7; |
| 3121 | _vol_eff = ((_vol = vol) + 1) * (_player ? _player->_vol_eff : 0) >> 7; |
3120 | 3122 | changed(IMuseDriver::pcVolume); |
3121 | 3123 | } |
3122 | 3124 | |
3123 | 3125 | void Part::set_pri(int8 pri) |
3124 | 3126 | { |
3125 | | _pri_eff = clamp((_pri = pri) + _player->_priority, 0, 255); |
| 3127 | _pri_eff = clamp((_pri = pri) + (_player ? _player->_priority : 0), 0, 255); |
3126 | 3128 | } |
3127 | 3129 | |
3128 | 3130 | void Part::set_pan(int8 pan) |
3129 | 3131 | { |
3130 | | _pan_eff = clamp((_pan = pan) + _player->_pan, -64, 63); |
| 3132 | _pan_eff = clamp((_pan = pan) + (_player ? _player->_pan : 0), -64, 63); |
3131 | 3133 | changed(IMuseDriver::pcPan); |
3132 | 3134 | } |
3133 | 3135 | |
3134 | 3136 | void Part::set_transpose(int8 transpose) |
3135 | 3137 | { |
3136 | | _transpose_eff = transpose_clamp((_transpose = transpose) + _player->_transpose, -12, 12); |
| 3138 | _transpose_eff = transpose_clamp((_transpose = transpose) + (_player ? _player->_transpose : 0), -12, 12); |
3137 | 3139 | changed(IMuseDriver::pcMod); |
3138 | 3140 | } |
3139 | 3141 | |
… |
… |
|
4372 | 4511 | midiNoteOn(mc->_chan, note, velocity); |
4373 | 4512 | } else if (part->_percussion) { |
4374 | 4513 | midiVolume(PERCUSSION_CHANNEL, part->_vol_eff); |
4375 | | midiProgram(PERCUSSION_CHANNEL, part->_bank, part->_player->_mt32emulate); |
| 4514 | midiProgram(PERCUSSION_CHANNEL, part->_bank, (part->_player ? part->_player->_mt32emulate : false)); |
4376 | 4515 | midiNoteOn(PERCUSSION_CHANNEL, note, velocity); |
4377 | 4516 | } |
4378 | 4517 | } |
… |
… |
|
4591 | 4731 | if (what & pcProgram) { |
4592 | 4732 | if (part->_bank) { |
4593 | 4733 | midiControl0(mc->_chan, part->_bank); |
4594 | | midiProgram(mc->_chan, part->_program, part->_player->_mt32emulate); |
| 4734 | midiProgram(mc->_chan, part->_program, (part->_player ? part->_player->_mt32emulate : false)); |
4595 | 4735 | midiControl0(mc->_chan, 0); |
4596 | 4736 | } else { |
4597 | | midiProgram(mc->_chan, part->_program, part->_player->_mt32emulate); |
| 4737 | midiProgram(mc->_chan, part->_program, (part->_player ? part->_player->_mt32emulate : false)); |
4598 | 4738 | } |
4599 | 4739 | } |
4600 | 4740 | |