address@hidden wrote:
Quoting David Henningsson <address@hidden>:
I think it might be best to just query libsndfile for the first
supported audio format, for a given file type, if no audio format
is specified and the default of 16 bit PCM fails. That would
solve the Ogg/Vorbis issue and possibly work fine with future
supported file types which have a specific audio format.
If that is possible, that would be even better.
With sf_command you can query the available audio formats for a
particular file type. If they add support for other audio formats
to Ogg though, that could become a problem, since you wouldn't be
able to specify Vorbis explicitly in that case.
Another option would be to dynamically list all the available
formats (by querying libsndfile for their descriptions) and for
formats that we know of, provide a short abbreviation as we do now.
For unrecognized formats, it could just list something like fmt17
(using its assigned ID number). Whenever "fmt" is encountered,
whatever number follows would be used verbatim as the format ID, so
that any format could be specified by its number (to provide
backwards compatibility in future versions where we add a format
abbreviation).
I think I might like that the best. We could also make it to where
-O help would list only valid audio formats for the given file
type (if specified).
How does that sound?
Well, it seems okay but perhaps a little overkill? :-) Also
abbreviations like "fmt17" might make a user confused. And it is
difficult to predict what kinds of formats libsndfile will implement in
the future anyway, so perhaps we could wait and see and fix it later,
if more formats arise.