fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] Re: Fast file renderer


From: josh
Subject: [fluid-dev] Re: Fast file renderer
Date: Sun, 11 Oct 2009 10:40:44 -0700
User-agent: Internet Messaging Program (IMP) H3 (4.1.6)

Quoting David Henningsson <address@hidden>:

So we have three cases here:

1) Libsndfile < 1.0.18, no vorbis support
2) Libsndfile >= 1.0.18, compiled without vorbis support
3) Libsndfile >= 1.0.18, compiled with vorbis support

We agree that 1 and 3 works currently, right?


Right.

In case 2, I believe the SF_FORMAT_VORBIS is still present in sndfile.h
so the code will still compile, right? Then whether sf_command(NULL,
SFC_GET_FORMAT_MAJOR, ...) will return the oga file extension or not
would be up to libsndfile, if it does, it's a bug in libsndfile. If it
does not, ((info->format & SF_FORMAT_TYPEMASK) == SF_FORMAT_OGG) will
never be true. So case 2 should also work.



That is true, it hadn't occurred to me that SF_FORMAT_VORBIS would still be available.


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?


// David


Josh





reply via email to

[Prev in Thread] Current Thread [Next in Thread]