mixer.c
changeset 621 944412baab72
parent 617 87116a42526e
child 625 1d489d8ec2e0
     1.1 --- a/mixer.c	Mon May 27 13:35:45 2013 -0700
     1.2 +++ b/mixer.c	Sat Jun 01 10:11:20 2013 -0700
     1.3 @@ -126,7 +126,7 @@
     1.4  
     1.5  static void add_chunk_decoder(const char *decoder)
     1.6  {
     1.7 -    void *ptr = SDL_realloc(chunk_decoders, (num_decoders + 1) * sizeof (const char **));
     1.8 +    void *ptr = SDL_realloc((void *)chunk_decoders, (num_decoders + 1) * sizeof (const char **));
     1.9      if (ptr == NULL) {
    1.10          return;  /* oh well, go on without it. */
    1.11      }
    1.12 @@ -267,7 +267,7 @@
    1.13              if (buf == NULL) {
    1.14                  return(snd);
    1.15              }
    1.16 -            memcpy(buf, snd, len);
    1.17 +            SDL_memcpy(buf, snd, len);
    1.18          }
    1.19  
    1.20          for (; e != NULL; e = e->next) {
    1.21 @@ -291,7 +291,7 @@
    1.22  
    1.23  #if SDL_VERSION_ATLEAST(1, 3, 0)
    1.24      /* Need to initialize the stream in SDL 1.3+ */
    1.25 -    memset(stream, mixer.silence, len);
    1.26 +    SDL_memset(stream, mixer.silence, len);
    1.27  #endif
    1.28  
    1.29      /* Mix the music (must be done before the channels are added) */
    1.30 @@ -647,7 +647,7 @@
    1.31              SDL_free(chunk);
    1.32              return(NULL);
    1.33          }
    1.34 -        memcpy(wavecvt.buf, chunk->abuf, chunk->alen);
    1.35 +        SDL_memcpy(wavecvt.buf, chunk->abuf, chunk->alen);
    1.36          SDL_free(chunk->abuf);
    1.37  
    1.38          /* Run the audio converter */
    1.39 @@ -690,7 +690,7 @@
    1.40      chunk->allocated = 0;
    1.41      mem += 12; /* WAV header */
    1.42      do {
    1.43 -        memcpy(magic, mem, 4);
    1.44 +        SDL_memcpy(magic, mem, 4);
    1.45          mem += 4;
    1.46          chunk->alen = ((mem[3]<<24)|(mem[2]<<16)|(mem[1]<<8)|(mem[0]));
    1.47          mem += 4;
    1.48 @@ -1142,7 +1142,7 @@
    1.49              mix_channel = NULL;
    1.50  
    1.51              /* rcg06042009 report available decoders at runtime. */
    1.52 -            SDL_free(chunk_decoders);
    1.53 +            SDL_free((void *)chunk_decoders);
    1.54              chunk_decoders = NULL;
    1.55              num_decoders = 0;
    1.56          }