RCS file: /cvsroot/scummvm/scummvm/backends/midi/windows.cpp,v
retrieving revision 1.12
diff -u -r1.12 windows.cpp
|
|
|
39 | 39 | bool _isOpen; |
40 | 40 | |
41 | 41 | void check_error(MMRESULT result); |
42 | | uint32 property(int prop, uint32 param) { return 0; } |
43 | 42 | |
44 | 43 | public: |
45 | 44 | MidiDriver_WIN() : _isOpen (false) { } |
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_player.cpp,v
retrieving revision 2.31
diff -u -r2.31 imuse_player.cpp
|
|
|
374 | 374 | // as follows: |
375 | 375 | // BYTE 00: Channel # |
376 | 376 | // BYTE 02: BIT 01(0x01): Part on?(1 = yes) |
| 377 | // BYTE 04: Priority adjustment [guessing] |
377 | 378 | // BYTE 05: Volume(upper 4 bits) [guessing] |
378 | 379 | // BYTE 06: Volume(lower 4 bits) [guessing] |
379 | 380 | // BYTE 09: BIT 04(0x08): Percussion?(1 = yes) |
… |
… |
|
382 | 383 | part = getPart(p[0] & 0x0F); |
383 | 384 | if (part) { |
384 | 385 | part->set_onoff(p[2] & 0x01); |
| 386 | part->set_pri (p[4]); |
385 | 387 | part->setVolume((p[5] & 0x0F) << 4 |(p[6] & 0x0F)); |
386 | 388 | part->_percussion = _isGM ?((p[9] & 0x08) > 0) : false; |
387 | 389 | if (part->_percussion) { |
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.402
diff -u -r2.402 scummvm.cpp
|
|
|
736 | 736 | } else if (((_midiDriver == MD_PCJR) || (_midiDriver == MD_PCSPK)) && ((_version > 2) && (_version < 5))) { |
737 | 737 | _musicEngine = _playerV2 = new Player_V2(this); |
738 | 738 | } else if (_version > 2) { |
739 | | _musicEngine = _imuse = IMuse::create(syst, _mixer, detector->createMidi()); |
| 739 | MidiDriver *driver = detector->createMidi(); |
| 740 | if (driver && detector->_native_mt32) |
| 741 | driver->property (MidiDriver::PROP_CHANNEL_MASK, 0x03FE); |
| 742 | _musicEngine = _imuse = IMuse::create(syst, _mixer, driver); |
740 | 743 | if (_imuse) { |
741 | 744 | if (detector->_gameTempo != 0) |
742 | 745 | _imuse->property(IMuse::PROP_TEMPO_BASE, detector->_gameTempo); |
RCS file: /cvsroot/scummvm/scummvm/sound/mididrv.h,v
retrieving revision 1.26
diff -u -r1.26 mididrv.h
|
|
|
44 | 44 | |
45 | 45 | enum { |
46 | 46 | // PROP_TIMEDIV = 1, |
47 | | PROP_OLD_ADLIB = 2 |
| 47 | PROP_OLD_ADLIB = 2, |
| 48 | PROP_CHANNEL_MASK = 3 |
48 | 49 | }; |
49 | 50 | |
50 | 51 | // Open the midi driver. |
RCS file: /cvsroot/scummvm/scummvm/sound/mpu401.cpp,v
retrieving revision 1.17
diff -u -r1.17 mpu401.cpp
|
|
|
85 | 85 | _started_thread (false), |
86 | 86 | _mutex (0), |
87 | 87 | _timer_proc (0), |
88 | | _timer_param (0) |
| 88 | _timer_param (0), |
| 89 | _channel_mask (0xFFFF) // Permit all 16 channels by default |
89 | 90 | { |
90 | 91 | |
91 | 92 | uint i; |
… |
… |
|
106 | 107 | send (0x7B << 8 | 0xB0 | i); |
107 | 108 | } |
108 | 109 | |
| 110 | uint32 MidiDriver_MPU401::property (int prop, uint32 param) { |
| 111 | switch (prop) { |
| 112 | case PROP_CHANNEL_MASK: |
| 113 | _channel_mask = param & 0xFFFF; |
| 114 | return 1; |
| 115 | } |
| 116 | |
| 117 | return 0; |
| 118 | } |
| 119 | |
109 | 120 | MidiChannel *MidiDriver_MPU401::allocateChannel() { |
110 | 121 | MidiChannel_MPU401 *chan; |
111 | 122 | uint i; |
112 | 123 | |
113 | 124 | for (i = 0; i < ARRAYSIZE(_midi_channels); ++i) { |
114 | | if (i == 9) |
| 125 | if (i == 9 || !(_channel_mask & (1 << i))) |
115 | 126 | continue; |
116 | 127 | chan = &_midi_channels[i]; |
117 | 128 | if (!chan->_allocated) { |
RCS file: /cvsroot/scummvm/scummvm/sound/mpu401.h,v
retrieving revision 1.13
diff -u -r1.13 mpu401.h
|
|
|
85 | 85 | OSystem::MutexRef _mutex; // Concurrent shutdown barrier |
86 | 86 | volatile TimerCallback _timer_proc; |
87 | 87 | void *_timer_param; |
| 88 | uint16 _channel_mask; |
88 | 89 | |
89 | 90 | static int midi_driver_thread (void *param); |
90 | 91 | |
… |
… |
|
94 | 95 | virtual void close(); |
95 | 96 | void setTimerCallback(void *timer_param, TimerCallback timer_proc); |
96 | 97 | uint32 getBaseTempo(void) { return 10000; } |
| 98 | uint32 property(int prop, uint32 param); |
97 | 99 | |
98 | 100 | MidiChannel *allocateChannel(); |
99 | 101 | MidiChannel *getPercussionChannel() { return &_midi_channels [9]; } |