wavestream.c
changeset 755 7c9cfb3bf040
parent 729 d10f63427a5f
child 760 b94b48c76c69
     1.1 --- a/wavestream.c	Thu Oct 12 21:27:20 2017 -0700
     1.2 +++ b/wavestream.c	Thu Oct 12 21:51:20 2017 -0700
     1.3 @@ -233,7 +233,7 @@
     1.4          if ((stop - pos) < original_len) {
     1.5              original_len = (int)(stop - pos);
     1.6          }
     1.7 -        original_len = SDL_RWread(music->src, music->cvt.buf, 1, original_len);
     1.8 +        original_len = (int)SDL_RWread(music->src, music->cvt.buf, 1, original_len);
     1.9          music->cvt.len = original_len;
    1.10          SDL_ConvertAudio(&music->cvt);
    1.11          SDL_MixAudioFormat(stream, music->cvt.buf, mixer.format,music->cvt.len_cvt, wavestream_volume);
    1.12 @@ -245,7 +245,7 @@
    1.13          }
    1.14          data = SDL_stack_alloc(Uint8, len);
    1.15          if (data) {
    1.16 -            len = SDL_RWread(music->src, data, 1, len);
    1.17 +            len = (int)SDL_RWread(music->src, data, 1, len);
    1.18              SDL_MixAudioFormat(stream, data, mixer.format, len, wavestream_volume);
    1.19              SDL_stack_free(data);
    1.20          }
    1.21 @@ -404,7 +404,7 @@
    1.22  {
    1.23      SamplerChunk *chunk;
    1.24      Uint8 *data;
    1.25 -    int i;
    1.26 +    Uint32 i;
    1.27      SDL_bool loaded = SDL_FALSE;
    1.28  
    1.29      data = (Uint8 *)SDL_malloc(chunk_length);
    1.30 @@ -427,8 +427,6 @@
    1.31      }
    1.32  
    1.33      loaded = SDL_TRUE;
    1.34 -
    1.35 -done:
    1.36      SDL_free(data);
    1.37      return loaded;
    1.38  }