diff options
author | Jamieson Christian | 2002-11-04 18:29:26 +0000 |
---|---|---|
committer | Jamieson Christian | 2002-11-04 18:29:26 +0000 |
commit | c10287988edffe5833b444e039348804ee28ddf7 (patch) | |
tree | 48b51216cb68a93762144e1fd40ea488535ebae9 /sound | |
parent | 2442bce6f376e080e770e5d5380d817f6da6e043 (diff) | |
download | scummvm-rg350-c10287988edffe5833b444e039348804ee28ddf7.tar.gz scummvm-rg350-c10287988edffe5833b444e039348804ee28ddf7.tar.bz2 scummvm-rg350-c10287988edffe5833b444e039348804ee28ddf7.zip |
Increased GM channel resource to full spectrum (0-15, instead of 0-8 Base MIDI config); misc. pitchbend cleanups
svn-id: r5403
Diffstat (limited to 'sound')
-rw-r--r-- | sound/mididrv.cpp | 15 | ||||
-rw-r--r-- | sound/mididrv.h | 8 |
2 files changed, 7 insertions, 16 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index bf28e0316c..e67311d19d 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -961,21 +961,6 @@ int MidiDriver_CORE::open(int mode) // start the output AudioOutputUnitStart(au_output); -#if 1 - // Send initial pitch bend sensitivity values for +/- 12 semitones. - // For information on control change registered parameters, - // which includes the Pitch Bend sensitivity settings, - // visit http://www.midi.org/about-midi/table3.htm, - // Table 3a. - int chan; - for (chan = 0; chan < 16; ++chan) { - MusicDeviceMIDIEvent(au_MusicDevice, (0xB0 | chan), 101, 0, 0); - MusicDeviceMIDIEvent(au_MusicDevice, (0xB0 | chan), 100, 0, 0); - MusicDeviceMIDIEvent(au_MusicDevice, (0xB0 | chan), 6, 12, 0); - MusicDeviceMIDIEvent(au_MusicDevice, (0xB0 | chan), 38, 0, 0); - } // next for -#endif - return 0; } diff --git a/sound/mididrv.h b/sound/mididrv.h index f93f854471..6544f7f885 100644 --- a/sound/mididrv.h +++ b/sound/mididrv.h @@ -99,7 +99,13 @@ public: static const char *get_error_name(int error_code); // HIGH-LEVEL SEMANTIC METHODS - virtual void setPitchBendRange (byte channel, uint range) = 0; + virtual void setPitchBendRange (byte channel, uint range) + { + send(( 0 << 16) | (101 << 8) | (0xB0 | channel)); + send(( 0 << 16) | (100 << 8) | (0xB0 | channel)); + send((range << 16) | ( 6 << 8) | (0xB0 | channel)); + send(( 0 << 16) | ( 38 << 8) | (0xB0 | channel)); + } }; |