src/audio/psp/SDL_pspaudio.c
changeset 7038 7f22b9ba218f
parent 7009 161b7b6a5303
child 7191 75360622e65f
     1.1 --- a/src/audio/psp/SDL_pspaudio.c	Sun Mar 31 12:48:50 2013 -0400
     1.2 +++ b/src/audio/psp/SDL_pspaudio.c	Sun Mar 31 13:05:40 2013 -0400
     1.3 @@ -46,8 +46,7 @@
     1.4      this->hidden = (struct SDL_PrivateAudioData *)
     1.5          SDL_malloc(sizeof(*this->hidden));
     1.6      if (this->hidden == NULL) {
     1.7 -        SDL_OutOfMemory();
     1.8 -        return 0;
     1.9 +        return SDL_OutOfMemory();
    1.10      }
    1.11      SDL_memset(this->hidden, 0, sizeof(*this->hidden));
    1.12  	switch (this->spec.format & 0xff) {
    1.13 @@ -56,8 +55,7 @@
    1.14  			this->spec.format = AUDIO_S16LSB;
    1.15  			break;
    1.16  		default:
    1.17 -			SDL_SetError("Unsupported audio format");
    1.18 -			return 0;
    1.19 +			return SDL_SetError("Unsupported audio format");
    1.20  	}
    1.21  
    1.22  	/* The sample count must be a multiple of 64. */
    1.23 @@ -86,8 +84,7 @@
    1.24  	mixlen = this->spec.size * NUM_BUFFERS;
    1.25  	this->hidden->rawbuf = (Uint8 *) memalign(64, mixlen);
    1.26  	if (this->hidden->rawbuf == NULL) {
    1.27 -		SDL_SetError("Couldn't allocate mixing buffer");
    1.28 -		return 0;
    1.29 +		return SDL_SetError("Couldn't allocate mixing buffer");
    1.30  	}
    1.31  
    1.32  	/* Setup the hardware channel. */
    1.33 @@ -98,10 +95,9 @@
    1.34  	}
    1.35  	this->hidden->channel = sceAudioChReserve(PSP_AUDIO_NEXT_CHANNEL, this->spec.samples, format);
    1.36  	if (this->hidden->channel < 0) {
    1.37 -		SDL_SetError("Couldn't reserve hardware channel");
    1.38  		free(this->hidden->rawbuf);
    1.39  		this->hidden->rawbuf = NULL;
    1.40 -		return 0;
    1.41 +		return SDL_SetError("Couldn't reserve hardware channel");
    1.42  	}
    1.43  
    1.44  	memset(this->hidden->rawbuf, 0, mixlen);
    1.45 @@ -110,7 +106,7 @@
    1.46  	}
    1.47  
    1.48  	this->hidden->next_buffer = 0;
    1.49 -	return 1;
    1.50 +	return 0;
    1.51  }
    1.52  
    1.53  static void PSPAUD_PlayDevice(_THIS)