diff src/audio/macrom/SDL_romaudio.c @ 3830:29e83f221c62 SDL-ryan-multiple-audio-device

Fixed some things to use SDL C runtime functions.
author Ryan C. Gordon <icculus@icculus.org>
date Sat, 07 Oct 2006 19:56:47 +0000
parents 1f156fd874fa
children 66fb40445587
line wrap: on
line diff
--- a/src/audio/macrom/SDL_romaudio.c	Sat Oct 07 19:53:48 2006 +0000
+++ b/src/audio/macrom/SDL_romaudio.c	Sat Oct 07 19:56:47 2006 +0000
@@ -145,7 +145,7 @@
     cmd.param2 = (long) &header;
     SndDoCommand(chan, &cmd, 0);
 
-    memset(buffer[fill_me], 0, audio->spec.size);
+    SDL_memset(buffer[fill_me], 0, audio->spec.size);
 
     /*
      * if audio device isn't locked, mix the next buffer to be queued in
@@ -203,7 +203,7 @@
     SDL_CalculateAudioSpec(&this->spec);
 
     /* initialize bufferCmd header */
-    memset(&header, 0, sizeof(header));
+    SDL_memset(&header, 0, sizeof(header));
     callback = (SndCallBackUPP) NewSndCallBackUPP(callBackProc);
     sample_bits = spec->size / spec->samples / spec->channels * 8;
 
@@ -236,13 +236,13 @@
 
     /* allocate 2 buffers */
     for (i = 0; i < 2; i++) {
-        buffer[i] = (UInt8 *) malloc(sizeof(UInt8) * spec->size);
+        buffer[i] = (UInt8 *) SDL_malloc(sizeof(UInt8) * spec->size);
         if (buffer[i] == NULL) {
             SNDMGR_CloseDevice(this);
             SDL_OutOfMemory();
             return 0;
         }
-        memset(buffer[i], 0, spec->size);
+        SDL_memset(buffer[i], 0, spec->size);
     }
 
     /* Create the sound manager channel */