speechd-discuss
[Top][All Lists]
Advanced

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

[PATCH] build - Bump libsndfile to a mandetory dependency


From: Jeremy Whiting
Subject: [PATCH] build - Bump libsndfile to a mandetory dependency
Date: Mon, 18 May 2015 10:38:02 -0600

Looks good to me.

On Sun, May 17, 2015 at 9:21 PM, Luke Yelavich
<luke.yelavich at canonical.com> wrote:
> From: Luke Yelavich <themuso at themuso.com>
>
> Sound icon functionality requires it, and behavior is confusing for
> users if sndfile is not present.
> ---
>  configure.ac               | 5 +----
>  src/modules/espeak.c       | 2 --
>  src/modules/ibmtts.c       | 2 --
>  src/modules/ivona.c        | 2 --
>  src/modules/module_utils.c | 4 ----
>  5 files changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 599b00d..9b2c9f9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -43,12 +43,9 @@ PKG_CHECK_MODULES([DOTCONF], [dotconf >= 1.3])
>  AC_SUBST([DOTCONF_CFLAGS])
>  AC_SUBST([DOTCONF_LIBS])
>
> -PKG_CHECK_MODULES([SNDFILE], [sndfile >= 1.0.2],
> -       [ac_cv_sndfile=1], [ac_cv_sndfile=0])
> +PKG_CHECK_MODULES([SNDFILE], [sndfile >= 1.0.2])
>  AC_SUBST([SNDFILE_CFLAGS])
>  AC_SUBST([SNDFILE_LIBS])
> -AC_DEFINE_UNQUOTED([HAVE_SNDFILE], [${ac_cv_sndfile}],
> -       [Set to 1 if you have libsndfile.])
>
>  # Checks for header files.
>  AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h limits.h netdb.h])
> diff --git a/src/modules/espeak.c b/src/modules/espeak.c
> index 06a5486..b4040bd 100644
> --- a/src/modules/espeak.c
> +++ b/src/modules/espeak.c
> @@ -889,11 +889,9 @@ static int uri_callback(int type, const char *uri, const 
> char *base)
>         int result = 1;
>         if (type == 1) {
>                 /* Audio icon */
> -#if HAVE_SNDFILE
>                 if (g_file_test(uri, G_FILE_TEST_EXISTS)) {
>                         result = 0;
>                 }
> -#endif
>         }
>         return result;
>  }
> diff --git a/src/modules/ibmtts.c b/src/modules/ibmtts.c
> index 77eac2f..1ff7773 100644
> --- a/src/modules/ibmtts.c
> +++ b/src/modules/ibmtts.c
> @@ -1705,7 +1705,6 @@ static char *ibmtts_subst_keys(char *key)
>  static char *ibmtts_search_for_sound_icon(const char *icon_name)
>  {
>         char *fn = NULL;
> -#if HAVE_SNDFILE
>         if (0 == strlen(IbmttsSoundIconFolder))
>                 return fn;
>         GString *filename = g_string_new(IbmttsSoundIconFolder);
> @@ -1729,7 +1728,6 @@ static char *ibmtts_search_for_sound_icon(const char 
> *icon_name)
>          * data.
>          */
>         g_string_free(filename, (fn == NULL));
> -#endif
>         return fn;
>  }
>
> diff --git a/src/modules/ivona.c b/src/modules/ivona.c
> index c444273..4f86511 100644
> --- a/src/modules/ivona.c
> +++ b/src/modules/ivona.c
> @@ -38,9 +38,7 @@
>  #include "module_utils.h"
>  #include "ivona_client.h"
>
> -#if HAVE_SNDFILE
>  #include <sndfile.h>
> -#endif
>
>  #define MODULE_NAME     "ivona"
>  #define MODULE_VERSION  "0.2"
> diff --git a/src/modules/module_utils.c b/src/modules/module_utils.c
> index 85679cf..298274a 100644
> --- a/src/modules/module_utils.c
> +++ b/src/modules/module_utils.c
> @@ -25,9 +25,7 @@
>  #include <config.h>
>  #endif
>
> -#if HAVE_SNDFILE
>  #include <sndfile.h>
> -#endif
>
>  #include <fdsetconv.h>
>  #include <spd_utils.h>
> @@ -1043,7 +1041,6 @@ int module_tts_output(AudioTrack track, AudioFormat 
> format)
>  int module_play_file(const char *filename)
>  {
>         int result = 0;
> -#if HAVE_SNDFILE
>         int subformat;
>         sf_count_t items;
>         sf_count_t readcount;
> @@ -1106,6 +1103,5 @@ cleanup2:
>         g_free(track.samples);
>  cleanup1:
>         sf_close(sf);
> -#endif
>         return result;
>  }
> --
> 2.1.4
>
>
> _______________________________________________
> Speechd mailing list
> Speechd at lists.freebsoft.org
> http://lists.freebsoft.org/mailman/listinfo/speechd



reply via email to

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