src/audio/SDL_wave.c
changeset 1465 8dfa9a6d69a5
parent 1428 5f52867ba65c
child 1487 dc6b59e925a2
equal deleted inserted replaced
1464:af30090c0330 1465:8dfa9a6d69a5
   548 
   548 
   549 done:
   549 done:
   550 	if ( format != NULL ) {
   550 	if ( format != NULL ) {
   551 		SDL_free(format);
   551 		SDL_free(format);
   552 	}
   552 	}
   553 	if ( freesrc && src ) {
   553 	if ( src ) {
   554 		SDL_RWclose(src);
   554 		if ( freesrc ) {
   555 	}
   555 			SDL_RWclose(src);
   556 	else {
   556 		} else {
   557 		// seek to the end of the file (given by the RIFF chunk)
   557 			// seek to the end of the file (given by the RIFF chunk)
   558 		SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR);
   558 			SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR);
       
   559 		}
   559 	}
   560 	}
   560 	if ( was_error ) {
   561 	if ( was_error ) {
   561 		spec = NULL;
   562 		spec = NULL;
   562 	}
   563 	}
   563 	return(spec);
   564 	return(spec);