Skip to content
Permalink
Browse files
Use SDL_RWops to read midifiles in timidity
  • Loading branch information
pmandin committed Jul 4, 2005
1 parent 4b6e895 commit 8496dbadb98d3c832e396e5cca6f48f01d5ed0d6

File 1 of 5 in 8496dba

12 music.c
@@ -1351,6 +1351,18 @@ Mix_Music *Mix_LoadMUS_RW(SDL_RWops *rw) {
}
} else
#endif
#ifdef MID_MUSIC
/* MIDI files have the magic four bytes "MThd" */
if ( strcmp((char *)magic, "MThd") == 0 ) {
music->type = MUS_MID;
#ifdef USE_TIMIDITY_MIDI
music->data.midi = Timidity_LoadSong_RW(rw);
if ( music->data.midi == NULL ) {
music->error = 1;
}
#endif
} else
#endif
#if defined(MOD_MUSIC) || defined(LIBMIKMOD_MUSIC)
if (1) {
music->type=MUS_MOD;

0 comments on commit 8496dba

Please sign in to comment.