diff playsound/playsound.c @ 343:03f47480200f

Now works correctly when specifying not all three of the --rate, --channels, and --format command line arguments.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 22 May 2002 09:30:52 +0000
parents f0f894d897bf
children cbb15ecf423a
line wrap: on
line diff
--- a/playsound/playsound.c	Wed May 22 09:27:54 2002 +0000
+++ b/playsound/playsound.c	Wed May 22 09:30:52 2002 +0000
@@ -895,17 +895,9 @@
              */
         if (use_specific_audiofmt)
         {
-            /* Pick sensible default for any value not explicitly specified. */
-            if (sound_desired.rate == 0)
-                sound_desired.rate = 44100;
-            if (sound_desired.format == 0)
-                sound_desired.format = AUDIO_S16SYS;
-            if (sound_desired.channels == 0)
-                sound_desired.channels = 2;
-
-            sdl_desired.freq = sound_desired.rate;
-            sdl_desired.format = sound_desired.format;
-            sdl_desired.channels = sound_desired.channels;
+            sdl_desired.freq = sample->desired.rate;
+            sdl_desired.format = sample->desired.format;
+            sdl_desired.channels = sample->desired.channels;
         } /* if */
         else
         {