src/audio/SDL_audio.c
changeset 1336 3692456e7b0f
parent 1330 450721ad5436
child 1341 d02b552e5304
     1.1 --- a/src/audio/SDL_audio.c	Mon Feb 06 17:28:04 2006 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Tue Feb 07 06:59:48 2006 +0000
     1.3 @@ -220,7 +220,7 @@
     1.4  				stream = audio->fake_stream;
     1.5  			}
     1.6  		}
     1.7 -		memset(stream, silence, stream_len);
     1.8 +		SDL_memset(stream, silence, stream_len);
     1.9  
    1.10  		if ( ! audio->paused ) {
    1.11  			SDL_mutexP(audio->mixer_lock);
    1.12 @@ -235,7 +235,7 @@
    1.13  			if ( stream == NULL ) {
    1.14  				stream = audio->fake_stream;
    1.15  			}
    1.16 -			memcpy(stream, audio->convert.buf,
    1.17 +			SDL_memcpy(stream, audio->convert.buf,
    1.18  			               audio->convert.len_cvt);
    1.19  		}
    1.20  
    1.21 @@ -299,17 +299,17 @@
    1.22  	audio = NULL;
    1.23  	idx = 0;
    1.24  #ifdef unix
    1.25 -	if ( (driver_name == NULL) && (getenv("ESPEAKER") != NULL) ) {
    1.26 +	if ( (driver_name == NULL) && (SDL_getenv("ESPEAKER") != NULL) ) {
    1.27  		/* Ahem, we know that if ESPEAKER is set, user probably wants
    1.28  		   to use ESD, but don't start it if it's not already running.
    1.29  		   This probably isn't the place to do this, but... Shh! :)
    1.30  		 */
    1.31  		for ( i=0; bootstrap[i]; ++i ) {
    1.32 -			if ( strcmp(bootstrap[i]->name, "esd") == 0 ) {
    1.33 +			if ( SDL_strcmp(bootstrap[i]->name, "esd") == 0 ) {
    1.34  				const char *esd_no_spawn;
    1.35  
    1.36  				/* Don't start ESD if it's not running */
    1.37 -				esd_no_spawn = getenv("ESD_NO_SPAWN");
    1.38 +				esd_no_spawn = SDL_getenv("ESD_NO_SPAWN");
    1.39  				if ( esd_no_spawn == NULL ) {
    1.40  					putenv("ESD_NO_SPAWN=1");
    1.41  				}
    1.42 @@ -329,13 +329,13 @@
    1.43  	if ( audio == NULL ) {
    1.44  		if ( driver_name != NULL ) {
    1.45  #if 0	/* This will be replaced with a better driver selection API */
    1.46 -			if ( strrchr(driver_name, ':') != NULL ) {
    1.47 -				idx = atoi(strrchr(driver_name, ':')+1);
    1.48 +			if ( SDL_strrchr(driver_name, ':') != NULL ) {
    1.49 +				idx = atoi(SDL_strrchr(driver_name, ':')+1);
    1.50  			}
    1.51  #endif
    1.52  			for ( i=0; bootstrap[i]; ++i ) {
    1.53 -				if (strncmp(bootstrap[i]->name, driver_name,
    1.54 -				            strlen(bootstrap[i]->name)) == 0) {
    1.55 +				if (SDL_strncmp(bootstrap[i]->name, driver_name,
    1.56 +				            SDL_strlen(bootstrap[i]->name)) == 0) {
    1.57  					if ( bootstrap[i]->available() ) {
    1.58  						audio=bootstrap[i]->create(idx);
    1.59  						break;
    1.60 @@ -375,7 +375,7 @@
    1.61  char *SDL_AudioDriverName(char *namebuf, int maxlen)
    1.62  {
    1.63  	if ( current_audio != NULL ) {
    1.64 -		strncpy(namebuf, current_audio->name, maxlen-1);
    1.65 +		SDL_strncpy(namebuf, current_audio->name, maxlen-1);
    1.66  		namebuf[maxlen-1] = '\0';
    1.67  		return(namebuf);
    1.68  	}
    1.69 @@ -436,7 +436,7 @@
    1.70  	SDL_CalculateAudioSpec(desired);
    1.71  
    1.72  	/* Open the audio subsystem */
    1.73 -	memcpy(&audio->spec, desired, sizeof(audio->spec));
    1.74 +	SDL_memcpy(&audio->spec, desired, sizeof(audio->spec));
    1.75  	audio->convert.needed = 0;
    1.76  	audio->enabled = 1;
    1.77  	audio->paused  = 1;
    1.78 @@ -489,7 +489,7 @@
    1.79  
    1.80  	/* See if we need to do any conversion */
    1.81  	if ( obtained != NULL ) {
    1.82 -		memcpy(obtained, &audio->spec, sizeof(audio->spec));
    1.83 +		SDL_memcpy(obtained, &audio->spec, sizeof(audio->spec));
    1.84  	} else if ( desired->freq != audio->spec.freq ||
    1.85                      desired->format != audio->spec.format ||
    1.86  	            desired->channels != audio->spec.channels ) {