comparison SDL_sound.c @ 340:5a72981b8cba

Added optional, experimental audio conversion routines by Frank Ranostaj.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 20 May 2002 16:21:58 +0000
parents 31cc49d7d0ce
children 3466dde3a846
comparison
equal deleted inserted replaced
339:e3ac0d41668c 340:5a72981b8cba
532 /* Now we need to set up the conversion buffer... */ 532 /* Now we need to set up the conversion buffer... */
533 533
534 memcpy(&desired, (_desired != NULL) ? _desired : &sample->actual, 534 memcpy(&desired, (_desired != NULL) ? _desired : &sample->actual,
535 sizeof (Sound_AudioInfo)); 535 sizeof (Sound_AudioInfo));
536 536
537 /* !!! FIXME: Was there a good reason this wasn't here before? */
538 /* !!! FIXME: (Maybe we just assumed that it was all or nothing?) */
539 if (desired.format == 0)
540 desired.format = sample->actual.format;
541 if (desired.channels == 0)
542 desired.channels = sample->actual.channels;
543 if (desired.rate == 0)
544 desired.rate = sample->actual.rate;
545
537 if (Sound_BuildAudioCVT(&internal->sdlcvt, 546 if (Sound_BuildAudioCVT(&internal->sdlcvt,
538 sample->actual.format, 547 sample->actual.format,
539 sample->actual.channels, 548 sample->actual.channels,
540 sample->actual.rate, 549 sample->actual.rate,
541 desired.format, 550 desired.format,