mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-22 07:30:50 +00:00
Make ogg vorbis support to work if libsndfile >= 1.0.18
This commit is contained in:
parent
aac65ca01a
commit
629fd249ff
3 changed files with 27 additions and 1 deletions
|
@ -170,9 +170,17 @@ else
|
|||
fi
|
||||
|
||||
if test "$LIBSNDFILE_SUPPORT" = "1"; then
|
||||
PKG_CHECK_MODULES(LIBSNDFILE_VORBIS, sndfile >= 1.0.18, LIBSNDFILE_HASVORBIS=1, LIBSNDFILE_HASVORBIS=0)
|
||||
AC_DEFINE(LIBSNDFILE_SUPPORT, 1, [Define to enable libsndfile support])
|
||||
if test "$LIBSNDFILE_HASVORBIS" = "1"; then
|
||||
AC_DEFINE(LIBSNDFILE_HASVORBIS, 1, [libsndfile has ogg vorbis support])
|
||||
fi
|
||||
else
|
||||
LIBSNDFILE_HASVORBIS=0
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(LIBSNDFILE_SUPPORT, test "$LIBSNDFILE_SUPPORT" = "1")
|
||||
AM_CONDITIONAL(LIBSNDFILE_HASVORBIS, test "$LIBSNDFILE_HASVORBIS" = "1")
|
||||
AC_SUBST(LIBSNDFILE_CFLAGS)
|
||||
AC_SUBST(LIBSNDFILE_LIBS)
|
||||
|
||||
|
@ -443,7 +451,11 @@ echo "**************************************************************"
|
|||
echo "Summary:"
|
||||
|
||||
if test "${LIBSNDFILE_SUPPORT}" = "1"; then
|
||||
echo "libsndfile: yes"
|
||||
if test "${LIBSNDFILE_HASVORBIS}" = "1"; then
|
||||
echo "libsndfile: yes (with ogg vorbis support)"
|
||||
else
|
||||
echo "libsndfile: yes"
|
||||
fi
|
||||
else
|
||||
echo "libsndfile: no (raw audio file rendering only)"
|
||||
fi
|
||||
|
|
|
@ -132,6 +132,9 @@
|
|||
/* Include the LADSPA Fx unit */
|
||||
#undef LADSPA
|
||||
|
||||
/* libsndfile has ogg vorbis support */
|
||||
#undef LIBSNDFILE_HASVORBIS
|
||||
|
||||
/* Define to enable libsndfile support */
|
||||
#undef LIBSNDFILE_SUPPORT
|
||||
|
||||
|
@ -166,6 +169,9 @@
|
|||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
|
|
|
@ -425,6 +425,7 @@ fluid_file_renderer_parse_options (char *filetype, char *format, char *endian,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
info->format = (info->format & ~SF_FORMAT_TYPEMASK) | type;
|
||||
|
||||
/* Look for subtype */
|
||||
|
@ -443,6 +444,13 @@ fluid_file_renderer_parse_options (char *filetype, char *format, char *endian,
|
|||
info->format = (info->format & ~SF_FORMAT_SUBMASK) | format_ids[i];
|
||||
}
|
||||
|
||||
#if LIBSNDFILE_HASVORBIS
|
||||
/* Force subformat to vorbis as nothing else would make sense currently */
|
||||
if ((info->format & SF_FORMAT_TYPEMASK) == SF_FORMAT_OGG) {
|
||||
info->format = (info->format & ~SF_FORMAT_SUBMASK) | SF_FORMAT_VORBIS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Look for endian */
|
||||
if (endian)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue