Mercurial > SDL_sound_CoreAudio
diff decoders/flac.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 | b12c4483815e |
line wrap: on
line diff
--- a/decoders/flac.c Fri Jul 05 22:34:55 2002 +0000 +++ b/decoders/flac.c Fri Jul 05 23:11:51 2002 +0000 @@ -308,8 +308,7 @@ { flac_t *f = (flac_t *) client_data; - /* !!! FIXME: Is every error really fatal? I don't know... */ - Sound_SetError(d_error_status_string[status]); + __Sound_SetError(d_error_status_string[status]); f->sample->flags |= SOUND_SAMPLEFLAG_ERROR; } /* error_callback */ @@ -449,9 +448,8 @@ decoder = d_new(); if (decoder == NULL) { - Sound_SetError(ERR_OUT_OF_MEMORY); free(f); - return(0); + BAIL_MACRO(ERR_OUT_OF_MEMORY, 0); } /* if */ d_set_read_callback(decoder, read_callback); @@ -515,9 +513,8 @@ /* Still not FLAC? Give up. */ if (!f->is_flac) { - Sound_SetError("FLAC: No metadata found. Not a FLAC stream?"); free_flac(f); - return(0); + BAIL_MACRO("FLAC: No metadata found. Not a FLAC stream?", 0); } /* if */ } /* if */ @@ -543,9 +540,8 @@ if (!d_process_one_frame(f->decoder)) { - Sound_SetError("FLAC: Couldn't decode frame."); sample->flags |= SOUND_SAMPLEFLAG_ERROR; - return(0); + BAIL_MACRO("FLAC: Couldn't decode frame.", 0); } /* if */ if (d_get_state(f->decoder) == D_END_OF_STREAM)