From 4d9db494842a8dd8e8c02f5d407434ade049a09a Mon Sep 17 00:00:00 2001 From: James Brown Date: Wed, 8 May 2002 06:17:59 +0000 Subject: Fix compile warnings. svn-id: r4237 --- sound/mididrv.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sound/mididrv.cpp') 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); -- cgit v1.2.3