# HG changeset patch # User Ryan C. Gordon # Date 1022059852 0 # Node ID 03f47480200f945ad22dc23d9ec483276ddb9970 # Parent fbbb1f25b944605eaad58fa02fadf57544546241 Now works correctly when specifying not all three of the --rate, --channels, and --format command line arguments. diff -r fbbb1f25b944 -r 03f47480200f playsound/playsound.c --- 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 {