[email protected] wrote:
Quoting David Henningsson <[email protected]>:

I realized that PKG_CHECK_MODULES could be used for checking the
libsndfile version, so I've committed what I think fixes the problem,
have a look and see if it is what you expect.

// David


I looked over your changes. I don't think depending on the LIBSNDFILE version is probably the right way to do it, since you can still build LIBSNDFILE without vorbis support (it depends on the external libraries).

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?

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.

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.

// David



_______________________________________________
fluid-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to