Mercurial > SDL_sound_CoreAudio
diff decoders/au.c @ 387:fb519e6028e3
Changed all the Sound_SetError() calls to __Sound_SetError (or BAIL*_MACRO)
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 05 Jul 2002 23:11:51 +0000 |
parents | cbb15ecf423a |
children | c66080364dff 45ee760a6f5a |
line wrap: on
line diff
--- a/decoders/au.c Fri Jul 05 22:34:55 2002 +0000 +++ b/decoders/au.c Fri Jul 05 23:11:51 2002 +0000 @@ -171,11 +171,8 @@ struct audec *dec; char c; - if (!read_au_header(rw, &hdr)) /* does byte order swapping. */ - { - Sound_SetError("AU: Not an .au file (bad header)"); - return(0); - } /* if */ + /* read_au_header() will do byte order swapping. */ + BAIL_IF_MACRO(!read_au_header(rw, &hdr), "AU: bad header", 0); dec = malloc(sizeof *dec); BAIL_IF_MACRO(dec == NULL, ERR_OUT_OF_MEMORY, 0); @@ -203,9 +200,8 @@ break; default: - Sound_SetError("AU: Unsupported .au encoding"); free(dec); - return 0; + BAIL_MACRO("AU: Unsupported .au encoding", 0); } /* switch */ sample->actual.rate = hdr.sample_rate; @@ -244,9 +240,8 @@ else { - Sound_SetError("AU: Not an .AU stream."); free(dec); - return(0); + BAIL_MACRO("AU: Not an .AU stream.", 0); } /* else */ sample->flags = SOUND_SAMPLEFLAG_CANSEEK;