diff 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
line wrap: on
line diff
--- a/SDL_sound.c	Mon May 20 16:21:20 2002 +0000
+++ b/SDL_sound.c	Mon May 20 16:21:58 2002 +0000
@@ -534,6 +534,15 @@
     memcpy(&desired, (_desired != NULL) ? _desired : &sample->actual,
             sizeof (Sound_AudioInfo));
 
+        /* !!! FIXME: Was there a good reason this wasn't here before?     */
+        /* !!! FIXME:  (Maybe we just assumed that it was all or nothing?) */
+    if (desired.format == 0)
+        desired.format = sample->actual.format;
+    if (desired.channels == 0)
+        desired.channels = sample->actual.channels;
+    if (desired.rate == 0)
+        desired.rate = sample->actual.rate;
+
     if (Sound_BuildAudioCVT(&internal->sdlcvt,
                             sample->actual.format,
                             sample->actual.channels,