aboutsummaryrefslogtreecommitdiff
path: root/sound/mididrv.cpp
diff options
context:
space:
mode:
authorJames Brown2002-05-08 06:17:59 +0000
committerJames Brown2002-05-08 06:17:59 +0000
commit4d9db494842a8dd8e8c02f5d407434ade049a09a (patch)
tree6474f956c336179b04d7299d464e9b81e318835f /sound/mididrv.cpp
parenta3edfd87ad0d3c7eed7384b96f87871db2cc4578 (diff)
downloadscummvm-rg350-4d9db494842a8dd8e8c02f5d407434ade049a09a.tar.gz
scummvm-rg350-4d9db494842a8dd8e8c02f5d407434ade049a09a.tar.bz2
scummvm-rg350-4d9db494842a8dd8e8c02f5d407434ade049a09a.zip
Fix compile warnings.
svn-id: r4237
Diffstat (limited to 'sound/mididrv.cpp')
-rw-r--r--sound/mididrv.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index 12c2011169..4dfaa40f38 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -1002,6 +1002,7 @@ private:
midi_channel ch[16];
};
+static unsigned char adlib_opadd[] = {0x00 ,0x01 ,0x02 ,0x08 ,0x09 ,0x0A ,0x10 ,0x11 ,0x12};
MidiDriver_MIDIEMU::MidiDriver_MIDIEMU(){
int i, j;
@@ -1051,7 +1052,7 @@ void MidiDriver_MIDIEMU::premix_proc(void *param, int16 *buf, unsigned int len)
void MidiDriver_MIDIEMU::send(uint32 b)
{
- unsigned char channel = b & 0x0F;
+ unsigned char channel = (char)(b & 0x0F);
switch (b & 0xF0) {
case 0x80: {/*note off*/
@@ -1069,13 +1070,12 @@ void MidiDriver_MIDIEMU::send(uint32 b)
int i, j;
int onl, on, nv;
unsigned char ins[11];
-
+ on = -1;
if (ch[channel].on != 0) {
for (i = 0; i < 9; i++)
chp[i][2]++;
- j = 0;
- on = -1;
+ j = 0;
onl = 0;
for (i = 0; i < 9; i++)
if ((chp[i][0] == -1) && (chp[i][2] > onl)) {
@@ -1235,8 +1235,6 @@ void MidiDriver_MIDIEMU::midi_write_adlib(unsigned int r, unsigned char v) {
adlib_data[r] = v;
}
-static unsigned char adlib_opadd[] = {0x00 ,0x01 ,0x02 ,0x08 ,0x09 ,0x0A ,0x10 ,0x11 ,0x12};
-
void MidiDriver_MIDIEMU::midi_fm_instrument(int voice, unsigned char *inst) {
/* Just gotta make sure this happens because who knows when it'll be reset otherwise.... */
midi_write_adlib(0xbd, 0);