Sample properties in playsound...
torbjorn.e.andersson at tietoenator.com
Fri Oct 5 03:10:13 EDT 2001
Ryan C. Gordon wrote:
> ...would it be better to have --rate, --channels, and --format options
> on the playsound command line for sound formats that require you to
> specify these properties? In the absence of those command line
> arguments, playsound can set the "desired" field to NULL.
That should work for playsound. By "format" you mean 8/16-bit
signed/unsigned big-/little-endian, right? Might be useful with an
option to explicitly tell it what kind of input - RAW, MP3, etc. - to
expect, regardless of what the filename says, but that would probably
need changes to Sound_NewSampleFromFile()...
What should the decoders do if the "desired" field is NULL? Some of them
can pick the appropriate format from their input, so they should be ok.
Others can pick any sensible format they like but have used the desired
format so far just to be nice, so they should also be ok.
What about decoders such as RAW? Should they fail, or should they use
More information about the sdlsound