diff src/audio/paudio/SDL_paudio.c @ 1336:3692456e7b0f

Use SDL_ prefixed versions of C library functions. FIXME: Change #include <stdlib.h> to #include "SDL_stdlib.h" Change #include <string.h> to #include "SDL_string.h" Make sure nothing else broke because of this...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 06:59:48 +0000
parents c9b51268668f
children 604d73db6802
line wrap: on
line diff
--- a/src/audio/paudio/SDL_paudio.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/audio/paudio/SDL_paudio.c	Tue Feb 07 06:59:48 2006 +0000
@@ -82,8 +82,8 @@
 
 static void Audio_DeleteDevice(SDL_AudioDevice *device)
 {
-	free(device->hidden);
-	free(device);
+	SDL_free(device->hidden);
+	SDL_free(device);
 }
 
 static SDL_AudioDevice *Audio_CreateDevice(int devindex)
@@ -91,20 +91,20 @@
 	SDL_AudioDevice *this;
 
 	/* Initialize all variables that we clean on shutdown */
-	this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice));
+	this = (SDL_AudioDevice *)SDL_malloc(sizeof(SDL_AudioDevice));
 	if ( this ) {
-		memset(this, 0, (sizeof *this));
+		SDL_memset(this, 0, (sizeof *this));
 		this->hidden = (struct SDL_PrivateAudioData *)
-				malloc((sizeof *this->hidden));
+				SDL_malloc((sizeof *this->hidden));
 	}
 	if ( (this == NULL) || (this->hidden == NULL) ) {
 		SDL_OutOfMemory();
 		if ( this ) {
-			free(this);
+			SDL_free(this);
 		}
 		return(0);
 	}
-	memset(this->hidden, 0, (sizeof *this->hidden));
+	SDL_memset(this->hidden, 0, (sizeof *this->hidden));
 	audio_fd = -1;
 
 	/* Set the function pointers */
@@ -457,7 +457,7 @@
 	if ( mixbuf == NULL ) {
 		return -1;
 	}
-	memset(mixbuf, spec->silence, spec->size);
+	SDL_memset(mixbuf, spec->silence, spec->size);
 
 	/*
 	 * Set some paramters: full volume, first speaker that we can find.
@@ -498,7 +498,7 @@
 
         /* Check to see if we need to use select() workaround */
         { char *workaround;
-                workaround = getenv("SDL_DSP_NOSELECT");
+                workaround = SDL_getenv("SDL_DSP_NOSELECT");
                 if ( workaround ) {
                         frame_ticks = (float)(spec->samples*1000)/spec->freq;
                         next_frame = SDL_GetTicks()+frame_ticks;