music_mad.c
changeset 625 1d489d8ec2e0
parent 621 944412baab72
child 631 a0d34c8077a1
     1.1 --- a/music_mad.c	Sat Jun 01 15:49:18 2013 -0700
     1.2 +++ b/music_mad.c	Sat Jun 01 19:52:15 2013 -0700
     1.3 @@ -26,14 +26,14 @@
     1.4  #include "music_mad.h"
     1.5  
     1.6  mad_data *
     1.7 -mad_openFileRW(SDL_RWops *rw, SDL_AudioSpec *mixer, int freerw)
     1.8 +mad_openFileRW(SDL_RWops *src, SDL_AudioSpec *mixer, int freesrc)
     1.9  {
    1.10    mad_data *mp3_mad;
    1.11  
    1.12    mp3_mad = (mad_data *)SDL_malloc(sizeof(mad_data));
    1.13    if (mp3_mad) {
    1.14 -    mp3_mad->rw = rw;
    1.15 -    mp3_mad->freerw = freerw;
    1.16 +    mp3_mad->src = src;
    1.17 +    mp3_mad->freesrc = freesrc;
    1.18      mad_stream_init(&mp3_mad->stream);
    1.19      mad_frame_init(&mp3_mad->frame);
    1.20      mad_synth_init(&mp3_mad->synth);
    1.21 @@ -55,8 +55,8 @@
    1.22    mad_frame_finish(&mp3_mad->frame);
    1.23    mad_synth_finish(&mp3_mad->synth);
    1.24  
    1.25 -  if (mp3_mad->freerw) {
    1.26 -    SDL_RWclose(mp3_mad->rw);
    1.27 +  if (mp3_mad->freesrc) {
    1.28 +    SDL_RWclose(mp3_mad->src);
    1.29    }
    1.30    SDL_free(mp3_mad);
    1.31  }