]> git.mxchange.org Git - flightgear.git/commitdiff
Remove old festival code.
authorehofman <ehofman>
Sun, 12 Feb 2006 17:04:22 +0000 (17:04 +0000)
committerehofman <ehofman>
Sun, 12 Feb 2006 17:04:22 +0000 (17:04 +0000)
configure.ac
src/ATC/ATC.cxx
src/ATC/Makefile.am
src/ATC/voice.cxx [deleted file]
src/ATC/voice.hxx [deleted file]
src/Main/Makefile.am

index 253ae23b3333960d1832443cdea96da367eabdf8..2e599906e3b41baf58ca3dcb0ba04ee88345f4a9 100644 (file)
@@ -118,14 +118,6 @@ fi
 AC_CHECK_HEADER(pthread.h)
 AM_CONDITIONAL(WITH_THREADS, test "x$with_threads" = "xyes")
 
-dnl Festival related checks
-# defaults to yes
-AC_ARG_WITH(festival, [  --with-festival         Use festival speech software [default=no]], [], [with_festival=no])
-if test "x$with_festival" = "xyes"; then
-    AC_DEFINE([USE_FESTIVAL], 1, [Define to enable festival speech software])
-fi
-AM_CONDITIONAL(USE_FESTIVAL, test "x$with_festival" = "xyes")
-
 dnl Used by JSBSim to conditionally compile in fgfs interface code
 AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode])
 
index b95d0008563bb480e0c9ce714acfe989f66798f1..b7be2f6444cb29926838c1aa1a2e3ffd184dc123 100644 (file)
 #include "ATCdisplay.hxx"
 #include "voice.hxx"
 
-#ifdef USE_FESTIVAL
-FGVoice *p_Voice = new FGVoice();
-#endif
-
 FGATC::FGATC() {
        freqClear = true;
        receiving = false;
@@ -244,14 +240,8 @@ void FGATC::Render(string& msg, const string& refname, bool repeating) {
                        globals->get_soundmgr()->add(simple, refname);
                        if(repeating) {
                                globals->get_soundmgr()->play_looped(refname);
-#ifdef USE_FESTIVAL
-                               p_Voice->send_transcript( msg , refname, 1 );
-#endif
                        } else {
                                globals->get_soundmgr()->play_once(refname);
-#ifdef USE_FESTIVAL
-                               p_Voice->send_transcript( msg , refname, 0 );
-#endif
                        }
                }
                delete[] buf;
@@ -266,14 +256,8 @@ void FGATC::Render(string& msg, const string& refname, bool repeating) {
                }
                if(repeating) {
                        globals->get_ATC_display()->RegisterRepeatingMessage(msg);
-#ifdef USE_FESTIVAL
-                       p_Voice->send_transcript( msg , refname, 1 );
-#endif
                } else {
                        globals->get_ATC_display()->RegisterSingleMessage(msg);
-#ifdef USE_FESTIVAL
-                       p_Voice->send_transcript( msg, refname, 0 );
-#endif
                }
        }
        _playing = true;        
@@ -287,9 +271,6 @@ void FGATC::NoRender(const string& refname) {
 #ifdef ENABLE_AUDIO_SUPPORT            
                        globals->get_soundmgr()->stop(refname);
                        globals->get_soundmgr()->remove(refname);
-# ifdef USE_FESTIVAL
-                       p_Voice->send_transcript( "--", refname, 2);
-# endif
 #endif
                } else {
                        globals->get_ATC_display()->CancelRepeatingMessage();
index 20424a7752146d59a4499be5ead5881c32ed92ef..2107b12cf47aaefa3e3587cfb3ae998d4a3be0ed 100644 (file)
@@ -1,11 +1,5 @@
 noinst_LIBRARIES = libATC.a
 
-if USE_FESTIVAL
-VOICE_SRC = voice.cxx voice.hxx
-else
-VOICE_SRC =
-endif
-
 libATC_a_SOURCES = \
        ATC.hxx ATC.cxx \
        atis.hxx atis.cxx \
@@ -25,7 +19,6 @@ libATC_a_SOURCES = \
        AILocalTraffic.hxx AILocalTraffic.cxx \
        AIGAVFRTraffic.hxx AIGAVFRTraffic.cxx \
        transmission.hxx transmission.cxx \
-       transmissionlist.hxx transmissionlist.cxx \
-       $(VOICE_SRC)
+       transmissionlist.hxx transmissionlist.cxx
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
diff --git a/src/ATC/voice.cxx b/src/ATC/voice.cxx
deleted file mode 100644 (file)
index 1e4d068..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-
-#include <simgear/compiler.h>
-
-#include <stdio.h>
-#include <malloc.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <netinet/in.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <unistd.h>
-#include <setjmp.h>
-#include <string.h>
-#include <strings.h>
-
-#include STL_IOSTREAM
-SG_USING_STD(cout);
-SG_USING_STD(endl);
-
-#define ATC_SERVER_ADDRESS "192.168.2.15" // adddress of machine running festival server
-
-#include "voice.hxx"
-
-int                    atc_sockfd = 0;
-int                    result, servlen;
-struct sockaddr_in     atc_serv_addr, atc_cli_add;
-
-//FGVoice *p_voice;
-
-bool FGVoice::send_transcript( string trans, string refname, short repeat )
-{
-       string msg;
-
-       switch ( repeat ) {
-               case 0: msg = "S " + refname + ">" + trans;
-                       break;
-               case 1: msg = "R " + refname + ">" + trans;
-                       break;
-               case 2: msg = "X " + refname;
-                       break;
-               }
-       // strip out some characters    
-       for(unsigned int i = 0; i < msg.length(); ++i) {
-               if((msg.substr(i,1) == "_") || (msg.substr(i,1) == "/")) {
-                       msg[i] = ' ';
-               }
-       }
-               
-       int len = msg.length(); 
-       if (sendto(atc_sockfd, (char *) msg.c_str(), len, 0, (struct sockaddr *) &atc_serv_addr, servlen ) != len) {
-                       cout << "network write failed for " << len << " chars" << endl;
-                       return false;
-               }
-       printf("Transmit: %s of %d chars\n", msg.c_str(), len );
-       return true;
-}
-
-FGVoice::FGVoice()
-{
-       string mesg = "Welcome to the FlightGear voice synthesizer";
-       string welcome = "welcome ";
-// Init the network stuff here
-       printf( "FGVoice created. Connecting to atc sim\n");
-  servlen = sizeof( atc_serv_addr );   
-  bzero((char *) &atc_serv_addr, servlen);
-  atc_serv_addr.sin_family = AF_INET;
-  atc_serv_addr.sin_addr.s_addr = inet_addr(ATC_SERVER_ADDRESS);
-  atc_serv_addr.sin_port = htons(7100);
-
-  if ((atc_sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
-               {
-               printf("Failed to obtain a socket\n");
-//             return( 0 );
-               }
-               else send_transcript( mesg, welcome, 0 );
-}
-
-FGVoice::~FGVoice()
-{
-       close( atc_sockfd );
-}
diff --git a/src/ATC/voice.hxx b/src/ATC/voice.hxx
deleted file mode 100644 (file)
index 6734611..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// atc_voice.hxx
-#include <simgear/constants.h>
-#include <simgear/compiler.h>
-
-#include STL_STRING
-SG_USING_STD(string);
-
-class FGVoice 
-{
-public:
-               FGVoice();
-               ~FGVoice();
-                       
-               bool send_transcript( string trans, string refname, short repeat );
-               
-};
-extern FGVoice *p_Voice;
-
index 7c116233cbd21ace41b2aa6de9a3a0e35d4c4a96..35bcbc9ffb07433ae83742ee71f5a7962a4bd2f9 100644 (file)
@@ -19,12 +19,6 @@ else
 THREAD_LIBS =
 endif
 
-if USE_FESTIVAL
-VOICE_LIBS = $(top_builddir)/src/Voice/libVoice.a
-else
-VOICE_LIBS =
-endif
-
 if USE_SDL
 GFX_CODE = fg_os_sdl.cxx fg_os.hxx
 else
@@ -98,7 +92,7 @@ fgfs_LDADD = \
        $(top_builddir)/src/Airports/libAirports.a \
        $(MPLAYER_LIBS) \
         $(top_builddir)/src/AIModel/libAIModel.a \
-       $(VOICE_LIBS) \
+        $(top_builddir)/src/Voice/libVoice.a \
        $(top_builddir)/src/Systems/libSystems.a \
        $(top_builddir)/src/Time/libTime.a \
        $(top_builddir)/src/Traffic/libTraffic.a \