music_mod.c
changeset 479 3d8a5a7b1249
parent 478 a928714c28dc
child 518 8bc9b5fd2aae
equal deleted inserted replaced
478:a928714c28dc 479:3d8a5a7b1249
   217 
   217 
   218 /* Load a MOD stream from an SDL_RWops object */
   218 /* Load a MOD stream from an SDL_RWops object */
   219 MODULE *MOD_new_RW(SDL_RWops *rw)
   219 MODULE *MOD_new_RW(SDL_RWops *rw)
   220 {
   220 {
   221 	MODULE *module;
   221 	MODULE *module;
       
   222 
       
   223 	/* Make sure the mikmod library is loaded */
       
   224 	if ( !Mix_Init(MIX_INIT_MOD) ) {
       
   225 		return NULL;
       
   226 	}
   222 
   227 
   223 	module = MikMod_LoadSongRW(rw,64);
   228 	module = MikMod_LoadSongRW(rw,64);
   224 	if (!module) {
   229 	if (!module) {
   225 		Mix_SetError("%s", mikmod.MikMod_strerror(*mikmod.MikMod_errno));
   230 		Mix_SetError("%s", mikmod.MikMod_strerror(*mikmod.MikMod_errno));
   226 		return NULL;
   231 		return NULL;