Skip to content
Permalink
Browse files

timidity: minor warning fixes

based on a patch by Wohlstand
  • Loading branch information
sezero committed Dec 16, 2019
1 parent 766fc39 commit fc0fe9335b75c1a127586ec89eb234db8d66b3d4
Showing with 4 additions and 3 deletions.
  1. +1 −0 src/codecs/timidity/instrum.c
  2. +2 −2 src/codecs/timidity/playmidi.c
  3. +1 −1 src/codecs/timidity/readmidi.c
@@ -160,6 +160,7 @@ static Instrument *load_instrument(MidiSong *song, char *name, int percussion,
char tmp[1024];
int i,j,noluck=0;
static char *patch_ext[] = PATCH_EXT_LIST;
(void)percussion; /* unused */

if (!name) return 0;

@@ -65,7 +65,7 @@ static void reset_midi(MidiSong *song)
reset_voices(song);
}

static void select_sample(MidiSong *song, int v, Instrument *ip, int vel)
static void select_sample(MidiSong *song, int v, Instrument *ip)
{
Sint32 f, cdiff, diff;
int s,i;
@@ -268,7 +268,7 @@ static void start_note(MidiSong *song, MidiEvent *e, int i)
song->voice[i].orig_frequency = freq_table[(int)(ip->sample->note_to_use)];
else
song->voice[i].orig_frequency = freq_table[e->a & 0x7F];
select_sample(song, i, ip, e->b);
select_sample(song, i, ip);
}

song->voice[i].status = VOICE_ON;
@@ -537,7 +537,7 @@ MidiEvent *read_midi_file(MidiSong *song, Sint32 *count, Sint32 *sp)
return NULL;
}
}
len=SDL_SwapBE32(len);
len=(Sint32)SDL_SwapBE32((Uint32)len);
if (memcmp(tmp, "MThd", 4) || len < 6)
{
SNDDBG(("Not a MIDI file!\n"));

0 comments on commit fc0fe93

Please sign in to comment.