comparison decoders/aiff.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 9d0b5ec9cc26
comparison
equal deleted inserted replaced
386:8c8ecd1008c9 387:fb519e6028e3
439 /* add other types here. */ 439 /* add other types here. */
440 440
441 default: 441 default:
442 SNDDBG(("AIFF: Format %lu is unknown.\n", 442 SNDDBG(("AIFF: Format %lu is unknown.\n",
443 (unsigned int) fmt->type)); 443 (unsigned int) fmt->type));
444 Sound_SetError("AIFF: Unsupported format"); 444 BAIL_MACRO("AIFF: Unsupported format", 0);
445 return(0); /* not supported whatsoever. */
446 } /* switch */ 445 } /* switch */
447 446
448 assert(0); /* shouldn't hit this point. */ 447 assert(0); /* shouldn't hit this point. */
449 return(0); 448 return(0);
450 } /* read_fmt */ 449 } /* read_fmt */
506 505
507 SDL_RWseek(rw, pos, SEEK_SET); /* if the seek fails, let it go... */ 506 SDL_RWseek(rw, pos, SEEK_SET); /* if the seek fails, let it go... */
508 507
509 if (!find_chunk(rw, ssndID)) 508 if (!find_chunk(rw, ssndID))
510 { 509 {
511 Sound_SetError("AIFF: No sound data chunk.");
512 free(a); 510 free(a);
513 return(0); 511 BAIL_MACRO("AIFF: No sound data chunk.", 0);
514 } /* if */ 512 } /* if */
515 513
516 if (!read_ssnd_chunk(rw, &s)) 514 if (!read_ssnd_chunk(rw, &s))
517 { 515 {
518 Sound_SetError("AIFF: Can't read sound data chunk.");
519 free(a); 516 free(a);
520 return(0); 517 BAIL_MACRO("AIFF: Can't read sound data chunk.", 0);
521 } /* if */ 518 } /* if */
522 519
523 a->fmt.total_bytes = a->bytesLeft = bytes_per_sample * c.numSampleFrames; 520 a->fmt.total_bytes = a->bytesLeft = bytes_per_sample * c.numSampleFrames;
524 a->fmt.data_starting_offset = SDL_RWtell(rw); 521 a->fmt.data_starting_offset = SDL_RWtell(rw);
525 internal->decoder_private = (void *) a; 522 internal->decoder_private = (void *) a;