src/audio/SDL_audiocvt.c
changeset 7037 3fedf1f25b94
parent 6885 700f1b25f77f
child 7191 75360622e65f
     1.1 --- a/src/audio/SDL_audiocvt.c	Fri Mar 29 21:29:57 2013 -0400
     1.2 +++ b/src/audio/SDL_audiocvt.c	Sun Mar 31 12:48:50 2013 -0400
     1.3 @@ -970,28 +970,23 @@
     1.4  
     1.5      /* Sanity check target pointer */
     1.6      if (cvt == NULL) {
     1.7 -        SDL_InvalidParamError("cvt");
     1.8 -        return -1;
     1.9 +        return SDL_InvalidParamError("cvt");
    1.10      }
    1.11      
    1.12      /* there are no unsigned types over 16 bits, so catch this up front. */
    1.13      if ((SDL_AUDIO_BITSIZE(src_fmt) > 16) && (!SDL_AUDIO_ISSIGNED(src_fmt))) {
    1.14 -        SDL_SetError("Invalid source format");
    1.15 -        return -1;
    1.16 +        return SDL_SetError("Invalid source format");
    1.17      }
    1.18      if ((SDL_AUDIO_BITSIZE(dst_fmt) > 16) && (!SDL_AUDIO_ISSIGNED(dst_fmt))) {
    1.19 -        SDL_SetError("Invalid destination format");
    1.20 -        return -1;
    1.21 +        return SDL_SetError("Invalid destination format");
    1.22      }
    1.23  
    1.24      /* prevent possible divisions by zero, etc. */
    1.25      if ((src_channels == 0) || (dst_channels == 0)) {
    1.26 -        SDL_SetError("Source or destination channels is zero");
    1.27 -        return -1;
    1.28 +        return SDL_SetError("Source or destination channels is zero");
    1.29      }
    1.30      if ((src_rate == 0) || (dst_rate == 0)) {
    1.31 -        SDL_SetError("Source or destination rate is zero");
    1.32 -        return -1;
    1.33 +        return SDL_SetError("Source or destination rate is zero");
    1.34      }
    1.35  #ifdef DEBUG_CONVERT
    1.36      printf("Build format %04x->%04x, channels %u->%u, rate %d->%d\n",