src/readclause.cpp \ | src/readclause.cpp \ | ||||
src/phonemelist.cpp \ | src/phonemelist.cpp \ | ||||
src/setlengths.cpp \ | src/setlengths.cpp \ | ||||
src/sonic.cpp \ | |||||
src/synthdata.cpp \ | src/synthdata.cpp \ | ||||
src/synthesize.cpp \ | src/synthesize.cpp \ | ||||
src/synth_mbrola.cpp \ | src/synth_mbrola.cpp \ | ||||
common_SOURCE += src/mbrowrap.cpp | common_SOURCE += src/mbrowrap.cpp | ||||
endif | endif | ||||
if OPT_SONIC | |||||
common_FLAGS += -DINCLUDE_SONIC | |||||
common_SOURCE += src/sonic.cpp | |||||
endif | |||||
if AUDIO_RUNTIME | if AUDIO_RUNTIME | ||||
wave_SOURCE = src/wave.cpp src/wave_pulse.cpp | wave_SOURCE = src/wave.cpp src/wave_pulse.cpp | ||||
wave_LIBS = -lpulse -lpulse-simple -lportaudio | wave_LIBS = -lpulse -lpulse-simple -lportaudio |
have_mbrola=yes | have_mbrola=yes | ||||
fi | fi | ||||
AC_ARG_WITH([sonic], | |||||
[AS_HELP_STRING([--with-sonic], [enable the sonic library to speed up the audio @<:@default=yes@:>@])], | |||||
[]) | |||||
if test "$with_sonic" = "no" ; then | |||||
have_sonic=no | |||||
else | |||||
have_sonic=yes | |||||
fi | |||||
AM_CONDITIONAL(OPT_KLATT, [test x"$have_klatt" = xyes]) | AM_CONDITIONAL(OPT_KLATT, [test x"$have_klatt" = xyes]) | ||||
AM_CONDITIONAL(OPT_MBROLA, [test x"$have_mbrola" = xyes]) | AM_CONDITIONAL(OPT_MBROLA, [test x"$have_mbrola" = xyes]) | ||||
AM_CONDITIONAL(OPT_SONIC, [test x"$have_sonic" = xyes]) | |||||
dnl ================================================================ | dnl ================================================================ | ||||
dnl wxWidgets checks. | dnl wxWidgets checks. | ||||
Klatt: ${have_klatt} | Klatt: ${have_klatt} | ||||
MBROLA: ${have_mbrola} | MBROLA: ${have_mbrola} | ||||
Sonic: ${have_sonic} | |||||
]) | ]) |
#include "speech.h" | #include "speech.h" | ||||
#include "sonic.h" | #include "sonic.h" | ||||
#ifdef INCLUDE_SONIC | |||||
struct sonicStreamStruct { | struct sonicStreamStruct { | ||||
short *inputBuffer; | short *inputBuffer; | ||||
sonicDestroyStream(stream); | sonicDestroyStream(stream); | ||||
return numSamples; | return numSamples; | ||||
} | } | ||||
#endif // INCLUDE_SONIC |
#include <sys/types.h> | #include <sys/types.h> | ||||
// conditional compilation options | |||||
#define INCLUDE_SONIC | |||||
#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN | #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN | ||||
#define ARCH_BIG | #define ARCH_BIG | ||||
#endif | #endif |