RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 1.65
diff -u -r1.65 imuse.cpp
|
|
|
4550 | 4550 | void IMuseGM::midiPitchBendFactor (byte chan, byte factor) { |
4551 | 4551 | if (_midi_pitchbend_factor_last[chan] != factor) { |
4552 | 4552 | _midi_pitchbend_factor_last[chan] = factor; |
4553 | | _md->setPitchBendRange (factor); // For high-level semantic drivers (such as QTMA) |
| 4553 | _md->setPitchBendRange (chan, factor); // For high-level semantic drivers (such as QTMA) |
4554 | 4554 | _md->send(( 0 << 16) | (101 << 8) | (0xB0 | chan)); |
4555 | 4555 | _md->send(( 0 << 16) | (100 << 8) | (0xB0 | chan)); |
4556 | 4556 | _md->send((factor << 16) | ( 6 << 8) | (0xB0 | chan)); |
RCS file: /cvsroot/scummvm/scummvm/sound/mididrv.cpp,v
retrieving revision 1.14
diff -u -r1.14 mididrv.cpp
|
|
|
45 | 45 | void send(uint32 b); |
46 | 46 | void pause(bool pause); |
47 | 47 | void set_stream_callback(void *param, StreamCallback *sc); |
48 | | void setPitchBendRange (uint range) { } |
| 48 | void setPitchBendRange (byte channel, uint range) { } |
49 | 49 | |
50 | 50 | private: |
51 | 51 | struct MyMidiHdr { |
… |
… |
|
305 | 305 | void send(uint32 b); |
306 | 306 | void pause(bool pause); |
307 | 307 | void set_stream_callback(void *param, StreamCallback *sc); |
308 | | void setPitchBendRange (uint range) { } |
| 308 | void setPitchBendRange (byte channel, uint range) { } |
309 | 309 | |
310 | 310 | private: |
311 | 311 | enum { |
… |
… |
|
517 | 517 | void send(uint32 b); |
518 | 518 | void pause(bool pause); |
519 | 519 | void set_stream_callback(void *param, StreamCallback *sc); |
520 | | void setPitchBendRange (uint range) { } |
| 520 | void setPitchBendRange (byte channel, uint range) { } |
521 | 521 | |
522 | 522 | private: |
523 | 523 | StreamCallback *_stream_proc; |
… |
… |
|
655 | 655 | void send(uint32 b); |
656 | 656 | void pause(bool pause) { } |
657 | 657 | void set_stream_callback(void *param, StreamCallback *sc); |
658 | | void setPitchBendRange (uint range); |
| 658 | void setPitchBendRange (byte channel, uint range); |
659 | 659 | |
660 | 660 | private: |
661 | 661 | NoteAllocator qtNoteAllocator; |
… |
… |
|
817 | 817 | // multiply it by a factor. If all was right, the factor would be 3/8, but for |
818 | 818 | // mysterious reasons the actual factor we have to use is more like 1/32 or 3/64. |
819 | 819 | // Maybe the QT docs are right, and |
820 | | long theBend = ((long)midiCmd[1] | (long)(midiCmd[2] << 7)); |
821 | | _pitchbend[chanID] = theBend; |
822 | | theBend = (theBend - 0x2000) * _pitchbend_range[channel] / 32; |
| 820 | _pitchbend[chanID] = ((uint16) midiCmd[1] | (uint16) (midiCmd[2] << 7)); |
| 821 | theBend = ((long) _pitchbend[chanID] - 0x2000) * _pitchbend_range[chanID] / 32; |
823 | 822 | |
824 | 823 | NASetController(qtNoteAllocator, qtNoteChannel[chanID], kControllerPitchBend, theBend); |
825 | 824 | } |
… |
… |
|
832 | 831 | } |
833 | 832 | } |
834 | 833 | |
835 | | void MidiDriver_QT::setPitchBendRange (channel, range) |
| 834 | void MidiDriver_QT::setPitchBendRange (byte channel, uint range) |
836 | 835 | { |
837 | 836 | if (_pitchbend_range[channel] == range) |
838 | 837 | return; |
… |
… |
|
865 | 864 | void send(uint32 b); |
866 | 865 | void pause(bool pause); |
867 | 866 | void set_stream_callback(void *param, StreamCallback *sc); |
868 | | void setPitchBendRange (uint range) { } |
| 867 | void setPitchBendRange (byte channel, uint range) { } |
869 | 868 | |
870 | 869 | private: |
871 | 870 | AudioUnit au_MusicDevice; |
… |
… |
|
988 | 987 | void send(uint32 b) { } |
989 | 988 | void pause(bool pause) { } |
990 | 989 | void set_stream_callback(void *param, StreamCallback *sc) { } |
991 | | void setPitchBendRange (uint range) { } |
| 990 | void setPitchBendRange (byte channel, uint range) { } |
992 | 991 | private: |
993 | 992 | }; |
994 | 993 | |
… |
… |
|
1061 | 1060 | void send(uint32 b); |
1062 | 1061 | void pause(bool pause); |
1063 | 1062 | void set_stream_callback(void *param, StreamCallback *sc); |
1064 | | void setPitchBendRange (uint range) { } |
| 1063 | void setPitchBendRange (byte channel, uint range) { } |
1065 | 1064 | |
1066 | 1065 | private: |
1067 | 1066 | void send_event(int do_flush); |
RCS file: /cvsroot/scummvm/scummvm/sound/mididrv.h,v
retrieving revision 1.4
diff -u -r1.4 mididrv.h
|
|
|
99 | 99 | static const char *get_error_name(int error_code); |
100 | 100 | |
101 | 101 | // HIGH-LEVEL SEMANTIC METHODS |
102 | | virtual void setPitchBendRange (uint range) = 0; |
| 102 | virtual void setPitchBendRange (byte channel, uint range) = 0; |
103 | 103 | }; |
104 | 104 | |
105 | 105 | |