comparison SDL_sound.c @ 400:9d0b5ec9cc26

FIXME cleanups.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 11 Jul 2002 05:28:52 +0000
parents fb519e6028e3
children ddce7101673e
comparison
equal deleted inserted replaced
399:e435bdcad552 400:9d0b5ec9cc26
504 /* 504 /*
505 * The bulk of the Sound_NewSample() work is done here... 505 * The bulk of the Sound_NewSample() work is done here...
506 * Ask the specified decoder to handle the data in (rw), and if 506 * Ask the specified decoder to handle the data in (rw), and if
507 * so, construct the Sound_Sample. Otherwise, try to wind (rw)'s stream 507 * so, construct the Sound_Sample. Otherwise, try to wind (rw)'s stream
508 * back to where it was, and return false. 508 * back to where it was, and return false.
509 *
510 * !!! FIXME: This is big, ugly, nasty, and smelly.
511 */ 509 */
512 static int init_sample(const Sound_DecoderFunctions *funcs, 510 static int init_sample(const Sound_DecoderFunctions *funcs,
513 Sound_Sample *sample, const char *ext, 511 Sound_Sample *sample, const char *ext,
514 Sound_AudioInfo *_desired) 512 Sound_AudioInfo *_desired)
515 { 513 {
516 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; 514 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque;
517 Sound_AudioInfo desired; 515 Sound_AudioInfo desired;
518 int pos = SDL_RWtell(internal->rw); /* !!! FIXME: Int? Really? */ 516 int pos = SDL_RWtell(internal->rw);
519 517
520 /* fill in the funcs for this decoder... */ 518 /* fill in the funcs for this decoder... */
521 sample->decoder = &funcs->info; 519 sample->decoder = &funcs->info;
522 internal->funcs = funcs; 520 internal->funcs = funcs;
523 if (!funcs->open(sample, ext)) 521 if (!funcs->open(sample, ext))